@ecan-bi/pivot-table 1.0.35 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +191 -190
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/pivot-table@1.0.
|
|
2
|
-
(function(Ke,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue"),require("dayjs"),require("lodash-es"),require("axios"),require("ant-design-vue"),require("ant-design-vue/es/input-number/style"),require("ant-design-vue/es/form/style"),require("echarts"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","lodash-es","axios","ant-design-vue","ant-design-vue/es/input-number/style","ant-design-vue/es/form/style","echarts","vuedraggable"],b):(Ke=typeof globalThis<"u"?globalThis:Ke||self,b(Ke["@ecan-bi/pivot-table"]={},Ke.Vue,Ke.Dayjs,Ke.LodashEs,Ke.Axios,Ke.AntDesignVue,null,null,Ke.Echarts,Ke.Draggable))})(this,function(Ke,b,Ol,Qe,sB,Ii
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.36 */
|
|
2
|
+
(function(Ke,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue"),require("dayjs"),require("lodash-es"),require("axios"),require("ant-design-vue"),require("ant-design-vue/es/input-number/style"),require("ant-design-vue/es/form/style"),require("echarts"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","lodash-es","axios","ant-design-vue","ant-design-vue/es/input-number/style","ant-design-vue/es/form/style","echarts","vuedraggable"],b):(Ke=typeof globalThis<"u"?globalThis:Ke||self,b(Ke["@ecan-bi/pivot-table"]={},Ke.Vue,Ke.Dayjs,Ke.LodashEs,Ke.Axios,Ke.AntDesignVue,null,null,Ke.Echarts,Ke.Draggable))})(this,function(Ke,b,Ol,Qe,sB,Ii,$K,GK,lB,ab){"use strict";function aB(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const hB=aB(lB),dB=i=>(i.install=t=>{t.component(i.name,i)},i);function hb(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(i);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(i,n[o])&&(e[n[o]]=i[n[o]])}return e}const uB=()=>{},cB=Object.assign,gB=Array.isArray,nf=i=>typeof i=="function",fB=i=>typeof i=="symbol";let db;const of=()=>db||(db=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function rf(i){const t=i&&i.__v_raw;return t?rf(t):i}function ub(i){return!(!i||i.__v_isRef!==!0)}function Di(i){return ub(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(fB));const Er=[];function sf(i,...t){if(process.env.NODE_ENV==="production")return;const e=Er.length?Er[Er.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Er[Er.length-1];if(!r)return[];const s=[];for(;r;){const l=s[0];l&&l.vnode===r?l.recurseCount++:s.push({vnode:r,recurseCount:0});const a=r.component&&r.component.parent;r=a&&a.vnode}return s}();if(n)lf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${yb(e,r.type)}>`).join(`
|
|
3
3
|
`),o]);else{const r=[`[Vue warn]: ${i}`,...t];o.length&&r.push(`
|
|
4
4
|
`,...function(s){const l=[];return s.forEach((a,h)=>{l.push(...h===0?[]:[`
|
|
5
5
|
`],...function({vnode:d,recurseCount:u}){const c=u>0?`... (${u} recursive calls)`:"",g=!!d.component&&d.component.parent==null,f=` at <${yb(d.component,d.type,g)}`,p=">"+c;return d.props?[f,...pB(d.props),p]:[f+p]}(a))}),l}(o)),console.warn(...r)}}function pB(i){const t=[],e=Object.keys(i);return e.slice(0,3).forEach(n=>{t.push(...cb(n,i[n]))}),e.length>3&&t.push(" ..."),t}function cb(i,t,e){return typeof t=="string"?(t=JSON.stringify(t),e?t:[`${i}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${i}=${t}`]:ub(t)?(t=cb(i,rf(t.value),!0),e?t:[`${i}=Ref<`,t,">"]):nf(t)?[`${i}=fn${t.name?`<${t.name}>`:""}`]:(t=rf(t),e?t:[`${i}=`,t])}const gb={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function lf(i,t,e,n){let o;try{o=n?i(...n):i()}catch(r){(function(s,l,a,h=!0){const d=l?l.vnode:null;if(l){let u=l.parent;const c=l.proxy,g=process.env.NODE_ENV!=="production"?gb[a]:a;for(;u;){const p=u.ec;if(p){for(let m=0;m<p.length;m++)if(p[m](s,c,g)===!1)return}u=u.parent}const f=l.appContext.config.errorHandler;if(f)return void lf(f,null,10,[s,c,g])}(function(u,c,g,f=!0){if(process.env.NODE_ENV!=="production"){const m=gb[c];if(g&&(p=g,Er.push(p)),sf("Unhandled error"+(m?` during execution of ${m}`:"")),g&&Er.pop(),f)throw u;console.error(u)}else console.error(u);var p})(s,a,d,h)})(r,t,e)}return o}let Nh=!1,af=!1;const Nn=[];let nr=0;const Rs=[];let so=null,or=0;const mB=Promise.resolve();function vB(i){Nn.length&&Nn.includes(i,Nh&&i.allowRecurse?nr+1:nr)||(i.id==null?Nn.push(i):Nn.splice(function(t){let e=nr+1,n=Nn.length;for(;e<n;){const o=e+n>>>1,r=Nn[o],s=zl(r);s<t||s===t&&r.pre?e=o+1:n=o}return e}(i.id),0,i),fb())}function fb(){Nh||af||(af=!0,mB.then(pb))}const zl=i=>i.id==null?1/0:i.id,bB=(i,t)=>{const e=zl(i)-zl(t);if(e===0){if(i.pre&&!t.pre)return-1;if(t.pre&&!i.pre)return 1}return e};function pb(i){af=!1,Nh=!0,process.env.NODE_ENV!=="production"&&(i=i||new Map),Nn.sort(bB);const t=process.env.NODE_ENV!=="production"?e=>mb(i,e):uB;try{for(nr=0;nr<Nn.length;nr++){const e=Nn[nr];if(e&&e.active!==!1){if(process.env.NODE_ENV!=="production"&&t(e))continue;lf(e,null,14)}}}finally{nr=0,Nn.length=0,function(e){if(Rs.length){const n=[...new Set(Rs)];if(Rs.length=0,so)return void so.push(...n);for(so=n,process.env.NODE_ENV!=="production"&&(e=e||new Map),so.sort((o,r)=>zl(o)-zl(r)),or=0;or<so.length;or++)process.env.NODE_ENV!=="production"&&mb(e,so[or])||so[or]();so=null,or=0}}(i),Nh=!1,(Nn.length||Rs.length)&&pb(i)}}function mb(i,t){if(i.has(t)){const e=i.get(t);if(e>100){const n=t.ownerInstance,o=n&&Cb(n.type);return sf(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}i.set(t,e+1)}else i.set(t,1)}const Wl=new Set;process.env.NODE_ENV!=="production"&&(of().__VUE_HMR_RUNTIME__={createRecord:hf(function(i,t){return Vh.has(i)?!1:(Vh.set(i,{initialDef:Nl(t),instances:new Set}),!0)}),rerender:hf(function(i,t){const e=Vh.get(i);e&&(e.initialDef.render=t,[...e.instances].forEach(n=>{t&&(n.render=t,Nl(n.type).render=t),n.renderCache=[],n.update()}))}),reload:hf(function(i,t){const e=Vh.get(i);if(!e)return;t=Nl(t),vb(e.initialDef,t);const n=[...e.instances];for(const r of n){const s=Nl(r.type);Wl.has(s)||(s!==e.initialDef&&vb(s,t),Wl.add(s)),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(Wl.add(s),r.ceReload(t.styles),Wl.delete(s)):r.parent?vB(r.parent.update):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}o=()=>{for(const r of n)Wl.delete(Nl(r.type))},gB(o)?Rs.push(...o):so&&so.includes(o,o.allowRecurse?or+1:or)||Rs.push(o),fb();var o})});const Vh=new Map;function Nl(i){return nf(t=i)&&"__vccOpts"in t?i.__vccOpts:i;var t}function vb(i,t){cB(i,t);for(const e in i)e==="__file"||e in t||delete i[e]}function hf(i){return(t,e)=>{try{return i(t,e)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let df;process.env.NODE_ENV;let bb="__VUE_INSTANCE_SETTERS__";(df=of()[bb])||(df=of()[bb]=[]),df.push(i=>i);const CB=/(?:^|[-_])(\w)/g,yB=i=>i.replace(CB,t=>t.toUpperCase()).replace(/[-_]/g,"");function Cb(i,t=!0){return nf(i)?i.displayName||i.name:i.name||t&&i.__name}function yb(i,t,e=!1){let n=Cb(t);if(!n&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(n=o[1])}if(!n&&i&&i.parent){const o=r=>{for(const s in r)if(r[s]===t)return s};n=o(i.components||i.parent.type.components)||o(i.appContext.components)}return n?yB(n):e?"App":"Anonymous"}function _B(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var _b,wb={exports:{}};function wB(){return _b||(_b=1,wb.exports=function(){var i=1e3,t=6e4,e=36e5,n="millisecond",o="second",r="minute",s="hour",l="day",a="week",h="month",d="quarter",u="year",c="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var H=["th","st","nd","rd"],k=B%100;return"["+B+(H[(k-20)%10]||H[k]||H[0])+"]"}},v=function(B,H,k){var P=String(B);return!P||P.length>=H?B:""+Array(H+1-P.length).join(k)+B},C={s:v,z:function(B){var H=-B.utcOffset(),k=Math.abs(H),P=Math.floor(k/60),E=k%60;return(H<=0?"+":"-")+v(P,2,"0")+":"+v(E,2,"0")},m:function B(H,k){if(H.date()<k.date())return-B(k,H);var P=12*(k.year()-H.year())+(k.month()-H.month()),E=H.clone().add(P,h),F=k-E<0,I=H.clone().add(P+(F?-1:1),h);return+(-(P+(k-E)/(F?E-I:I-E))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:h,y:u,w:a,d:l,D:c,h:s,m:r,s:o,ms:n,Q:d}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},S="en",_={};_[S]=m;var y="$isDayjsObject",w=function(B){return B instanceof M||!(!B||!B[y])},A=function B(H,k,P){var E;if(!H)return S;if(typeof H=="string"){var F=H.toLowerCase();_[F]&&(E=F),k&&(_[F]=k,E=F);var I=H.split("-");if(!E&&I.length>1)return B(I[0])}else{var L=H.name;_[L]=H,E=L}return!P&&E&&(S=E),E||!P&&S},R=function(B,H){if(w(B))return B.clone();var k=typeof H=="object"?H:{};return k.date=B,k.args=arguments,new M(k)},x=C;x.l=A,x.i=w,x.w=function(B,H){return R(B,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var M=function(){function B(k){this.$L=A(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[y]=!0}var H=B.prototype;return H.parse=function(k){this.$d=function(P){var E=P.date,F=P.utc;if(E===null)return new Date(NaN);if(x.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var I=E.match(f);if(I){var L=I[2]-1||0,D=(I[7]||"0").substring(0,3);return F?new Date(Date.UTC(I[1],L,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)):new Date(I[1],L,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)}}return new Date(E)}(k),this.init()},H.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},H.$utils=function(){return x},H.isValid=function(){return this.$d.toString()!==g},H.isSame=function(k,P){var E=R(k);return this.startOf(P)<=E&&E<=this.endOf(P)},H.isAfter=function(k,P){return R(k)<this.startOf(P)},H.isBefore=function(k,P){return this.endOf(P)<R(k)},H.$g=function(k,P,E){return x.u(k)?this[P]:this.set(E,k)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(k,P){var E=this,F=!!x.u(P)||P,I=x.p(k),L=function(K,U){var Q=x.w(E.$u?Date.UTC(E.$y,U,K):new Date(E.$y,U,K),E);return F?Q:Q.endOf(l)},D=function(K,U){return x.w(E.toDate()[K].apply(E.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(U)),E)},O=this.$W,V=this.$M,W=this.$D,j="set"+(this.$u?"UTC":"");switch(I){case u:return F?L(1,0):L(31,11);case h:return F?L(1,V):L(0,V+1);case a:var $=this.$locale().weekStart||0,X=(O<$?O+7:O)-$;return L(F?W-X:W+(6-X),V);case l:case c:return D(j+"Hours",0);case s:return D(j+"Minutes",1);case r:return D(j+"Seconds",2);case o:return D(j+"Milliseconds",3);default:return this.clone()}},H.endOf=function(k){return this.startOf(k,!1)},H.$set=function(k,P){var E,F=x.p(k),I="set"+(this.$u?"UTC":""),L=(E={},E[l]=I+"Date",E[c]=I+"Date",E[h]=I+"Month",E[u]=I+"FullYear",E[s]=I+"Hours",E[r]=I+"Minutes",E[o]=I+"Seconds",E[n]=I+"Milliseconds",E)[F],D=F===l?this.$D+(P-this.$W):P;if(F===h||F===u){var O=this.clone().set(c,1);O.$d[L](D),O.init(),this.$d=O.set(c,Math.min(this.$D,O.daysInMonth())).$d}else L&&this.$d[L](D);return this.init(),this},H.set=function(k,P){return this.clone().$set(k,P)},H.get=function(k){return this[x.p(k)]()},H.add=function(k,P){var E,F=this;k=Number(k);var I=x.p(P),L=function(V){var W=R(F);return x.w(W.date(W.date()+Math.round(V*k)),F)};if(I===h)return this.set(h,this.$M+k);if(I===u)return this.set(u,this.$y+k);if(I===l)return L(1);if(I===a)return L(7);var D=(E={},E[r]=t,E[s]=e,E[o]=i,E)[I]||1,O=this.$d.getTime()+k*D;return x.w(O,this)},H.subtract=function(k,P){return this.add(-1*k,P)},H.format=function(k){var P=this,E=this.$locale();if(!this.isValid())return E.invalidDate||g;var F=k||"YYYY-MM-DDTHH:mm:ssZ",I=x.z(this),L=this.$H,D=this.$m,O=this.$M,V=E.weekdays,W=E.months,j=E.meridiem,$=function(U,Q,dt,pt){return U&&(U[Q]||U(P,F))||dt[Q].slice(0,pt)},X=function(U){return x.s(L%12||12,U,"0")},K=j||function(U,Q,dt){var pt=U<12?"AM":"PM";return dt?pt.toLowerCase():pt};return F.replace(p,function(U,Q){return Q||function(dt){switch(dt){case"YY":return String(P.$y).slice(-2);case"YYYY":return x.s(P.$y,4,"0");case"M":return O+1;case"MM":return x.s(O+1,2,"0");case"MMM":return $(E.monthsShort,O,W,3);case"MMMM":return $(W,O);case"D":return P.$D;case"DD":return x.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return $(E.weekdaysMin,P.$W,V,2);case"ddd":return $(E.weekdaysShort,P.$W,V,3);case"dddd":return V[P.$W];case"H":return String(L);case"HH":return x.s(L,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return K(L,D,!0);case"A":return K(L,D,!1);case"m":return String(D);case"mm":return x.s(D,2,"0");case"s":return String(P.$s);case"ss":return x.s(P.$s,2,"0");case"SSS":return x.s(P.$ms,3,"0");case"Z":return I}return null}(U)||I.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(k,P,E){var F,I=this,L=x.p(P),D=R(k),O=(D.utcOffset()-this.utcOffset())*t,V=this-D,W=function(){return x.m(I,D)};switch(L){case u:F=W()/12;break;case h:F=W();break;case d:F=W()/3;break;case a:F=(V-O)/6048e5;break;case l:F=(V-O)/864e5;break;case s:F=V/e;break;case r:F=V/t;break;case o:F=V/i;break;default:F=V}return E?F:x.a(F)},H.daysInMonth=function(){return this.endOf(h).$D},H.$locale=function(){return _[this.$L]},H.locale=function(k,P){if(!k)return this.$L;var E=this.clone(),F=A(k,P,!0);return F&&(E.$L=F),E},H.clone=function(){return x.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},B}(),T=M.prototype;return R.prototype=T,[["$ms",n],["$s",o],["$m",r],["$H",s],["$W",l],["$M",h],["$y",u],["$D",c]].forEach(function(B){T[B[1]]=function(H){return this.$g(H,B[0],B[1])}}),R.extend=function(B,H){return B.$i||(B(H,M,R),B.$i=!0),R},R.locale=A,R.isDayjs=w,R.unix=function(B){return R(1e3*B)},R.en=_[S],R.Ls=_,R.p={},R}()),wb.exports}var Vn=_B(wB()),Sb=typeof global=="object"&&global&&global.Object===Object&&global,SB=typeof self=="object"&&self&&self.Object===Object&&self,Ro=Sb||SB||Function("return this")(),As=Ro.Symbol,xb=Object.prototype,xB=xb.hasOwnProperty,RB=xb.toString,Vl=As?As.toStringTag:void 0,AB=Object.prototype.toString,Rb=As?As.toStringTag:void 0;function jl(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Rb&&Rb in Object(i)?function(t){var e=xB.call(t,Vl),n=t[Vl];try{t[Vl]=void 0;var o=!0}catch{}var r=RB.call(t);return o&&(e?t[Vl]=n:delete t[Vl]),r}(i):function(t){return AB.call(t)}(i)}function $l(i){return i!=null&&typeof i=="object"}var uf=Array.isArray;function jh(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}function Ab(i){if(!jh(i))return!1;var t=jl(i);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"}var Tb,cf=Ro["__core-js_shared__"],Mb=(Tb=/[^.]+$/.exec(cf&&cf.keys&&cf.keys.IE_PROTO||""))?"Symbol(src)_1."+Tb:"",TB=Function.prototype.toString;function kr(i){if(i!=null){try{return TB.call(i)}catch{}try{return i+""}catch{}}return""}var MB=/^\[object .+?Constructor\]$/,BB=Function.prototype,PB=Object.prototype,HB=BB.toString,EB=PB.hasOwnProperty,kB=RegExp("^"+HB.call(EB).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function LB(i){return!(!jh(i)||(t=i,Mb&&Mb in t))&&(Ab(i)?kB:MB).test(kr(i));var t}function Lr(i,t){var e=function(n,o){return n==null?void 0:n[o]}(i,t);return LB(e)?e:void 0}var gf=Lr(Ro,"WeakMap"),Bb=Object.create,FB=function(){function i(){}return function(t){if(!jh(t))return{};if(Bb)return Bb(t);i.prototype=t;var e=new i;return i.prototype=void 0,e}}(),Pb=function(){try{var i=Lr(Object,"defineProperty");return i({},"",{}),i}catch{}}(),IB=/^(?:0|[1-9]\d*)$/;function DB(i,t){var e=typeof i;return!!(t=t??9007199254740991)&&(e=="number"||e!="symbol"&&IB.test(i))&&i>-1&&i%1==0&&i<t}function Hb(i,t){return i===t||i!=i&&t!=t}var OB=Object.prototype.hasOwnProperty;function zB(i,t,e){var n=i[t];OB.call(i,t)&&Hb(n,e)&&(e!==void 0||t in i)||function(o,r,s){r=="__proto__"&&Pb?Pb(o,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):o[r]=s}(i,t,e)}function Eb(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=9007199254740991}var WB=Object.prototype;function kb(i){var t=i&&i.constructor;return i===(typeof t=="function"&&t.prototype||WB)}function Lb(i){return $l(i)&&jl(i)=="[object Arguments]"}var Fb=Object.prototype,NB=Fb.hasOwnProperty,VB=Fb.propertyIsEnumerable,jB=Lb(function(){return arguments}())?Lb:function(i){return $l(i)&&NB.call(i,"callee")&&!VB.call(i,"callee")},Ib=typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,Db=Ib&&typeof module=="object"&&module&&!module.nodeType&&module,Ob=Db&&Db.exports===Ib?Ro.Buffer:void 0,zb=(Ob?Ob.isBuffer:void 0)||function(){return!1},ze={};function ff(i){return function(t){return i(t)}}ze["[object Float32Array]"]=ze["[object Float64Array]"]=ze["[object Int8Array]"]=ze["[object Int16Array]"]=ze["[object Int32Array]"]=ze["[object Uint8Array]"]=ze["[object Uint8ClampedArray]"]=ze["[object Uint16Array]"]=ze["[object Uint32Array]"]=!0,ze["[object Arguments]"]=ze["[object Array]"]=ze["[object ArrayBuffer]"]=ze["[object Boolean]"]=ze["[object DataView]"]=ze["[object Date]"]=ze["[object Error]"]=ze["[object Function]"]=ze["[object Map]"]=ze["[object Number]"]=ze["[object Object]"]=ze["[object RegExp]"]=ze["[object Set]"]=ze["[object String]"]=ze["[object WeakMap]"]=!1;var Wb=typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,Gl=Wb&&typeof module=="object"&&module&&!module.nodeType&&module,pf=Gl&&Gl.exports===Wb&&Sb.process,Ts=function(){try{var i=Gl&&Gl.require&&Gl.require("util").types;return i||pf&&pf.binding&&pf.binding("util")}catch{}}(),Nb=Ts&&Ts.isTypedArray,$B=Nb?ff(Nb):function(i){return $l(i)&&Eb(i.length)&&!!ze[jl(i)]},GB=Object.prototype.hasOwnProperty;function UB(i,t){var e=uf(i),n=!e&&jB(i),o=!e&&!n&&zb(i),r=!e&&!n&&!o&&$B(i),s=e||n||o||r,l=s?function(d,u){for(var c=-1,g=Array(d);++c<d;)g[c]=u(c);return g}(i.length,String):[],a=l.length;for(var h in i)!GB.call(i,h)||s&&(h=="length"||o&&(h=="offset"||h=="parent")||r&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||DB(h,a))||l.push(h);return l}function Vb(i,t){return function(e){return i(t(e))}}var KB=Vb(Object.keys,Object),YB=Object.prototype.hasOwnProperty;function XB(i){return(t=i)!=null&&Eb(t.length)&&!Ab(t)?UB(i):function(e){if(!kb(e))return KB(e);var n=[];for(var o in Object(e))YB.call(e,o)&&o!="constructor"&&n.push(o);return n}(i);var t}var Ul=Lr(Object,"create"),qB=Object.prototype.hasOwnProperty,ZB=Object.prototype.hasOwnProperty;function Fr(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function $h(i,t){for(var e=i.length;e--;)if(Hb(i[e][0],t))return e;return-1}Fr.prototype.clear=function(){this.__data__=Ul?Ul(null):{},this.size=0},Fr.prototype.delete=function(i){var t=this.has(i)&&delete this.__data__[i];return this.size-=t?1:0,t},Fr.prototype.get=function(i){var t=this.__data__;if(Ul){var e=t[i];return e==="__lodash_hash_undefined__"?void 0:e}return qB.call(t,i)?t[i]:void 0},Fr.prototype.has=function(i){var t=this.__data__;return Ul?t[i]!==void 0:ZB.call(t,i)},Fr.prototype.set=function(i,t){var e=this.__data__;return this.size+=this.has(i)?0:1,e[i]=Ul&&t===void 0?"__lodash_hash_undefined__":t,this};var JB=Array.prototype.splice;function Ao(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}Ao.prototype.clear=function(){this.__data__=[],this.size=0},Ao.prototype.delete=function(i){var t=this.__data__,e=$h(t,i);return!(e<0)&&(e==t.length-1?t.pop():JB.call(t,e,1),--this.size,!0)},Ao.prototype.get=function(i){var t=this.__data__,e=$h(t,i);return e<0?void 0:t[e][1]},Ao.prototype.has=function(i){return $h(this.__data__,i)>-1},Ao.prototype.set=function(i,t){var e=this.__data__,n=$h(e,i);return n<0?(++this.size,e.push([i,t])):e[n][1]=t,this};var Kl=Lr(Ro,"Map");function Gh(i,t){var e,n,o=i.__data__;return((n=typeof(e=t))=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null)?o[typeof t=="string"?"string":"hash"]:o.map}function Ms(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}Ms.prototype.clear=function(){this.size=0,this.__data__={hash:new Fr,map:new(Kl||Ao),string:new Fr}},Ms.prototype.delete=function(i){var t=Gh(this,i).delete(i);return this.size-=t?1:0,t},Ms.prototype.get=function(i){return Gh(this,i).get(i)},Ms.prototype.has=function(i){return Gh(this,i).has(i)},Ms.prototype.set=function(i,t){var e=Gh(this,i),n=e.size;return e.set(i,t),this.size+=e.size==n?0:1,this};var QB=Vb(Object.getPrototypeOf,Object);function Bs(i){var t=this.__data__=new Ao(i);this.size=t.size}Bs.prototype.clear=function(){this.__data__=new Ao,this.size=0},Bs.prototype.delete=function(i){var t=this.__data__,e=t.delete(i);return this.size=t.size,e},Bs.prototype.get=function(i){return this.__data__.get(i)},Bs.prototype.has=function(i){return this.__data__.has(i)},Bs.prototype.set=function(i,t){var e=this.__data__;if(e instanceof Ao){var n=e.__data__;if(!Kl||n.length<199)return n.push([i,t]),this.size=++e.size,this;e=this.__data__=new Ms(n)}return e.set(i,t),this.size=e.size,this};var tP=Object.prototype.propertyIsEnumerable,jb=Object.getOwnPropertySymbols,eP=jb?function(i){return i==null?[]:(i=Object(i),function(t,e){for(var n=-1,o=t==null?0:t.length,r=0,s=[];++n<o;){var l=t[n];e(l,n,t)&&(s[r++]=l)}return s}(jb(i),function(t){return tP.call(i,t)}))}:function(){return[]};function iP(i){return function(t,e,n){var o=e(t);return uf(t)?o:function(r,s){for(var l=-1,a=s.length,h=r.length;++l<a;)r[h+l]=s[l];return r}(o,n(t))}(i,XB,eP)}var mf=Lr(Ro,"DataView"),vf=Lr(Ro,"Promise"),bf=Lr(Ro,"Set"),$b="[object Map]",Gb="[object Promise]",Ub="[object Set]",Kb="[object WeakMap]",Yb="[object DataView]",nP=kr(mf),oP=kr(Kl),rP=kr(vf),sP=kr(bf),lP=kr(gf),To=jl;(mf&&To(new mf(new ArrayBuffer(1)))!=Yb||Kl&&To(new Kl)!=$b||vf&&To(vf.resolve())!=Gb||bf&&To(new bf)!=Ub||gf&&To(new gf)!=Kb)&&(To=function(i){var t=jl(i),e=t=="[object Object]"?i.constructor:void 0,n=e?kr(e):"";if(n)switch(n){case nP:return Yb;case oP:return $b;case rP:return Gb;case sP:return Ub;case lP:return Kb}return t});var aP=Object.prototype.hasOwnProperty,Xb=Ro.Uint8Array;function Cf(i){var t=new i.constructor(i.byteLength);return new Xb(t).set(new Xb(i)),t}var hP=/\w*$/,qb=As?As.prototype:void 0,Zb=qb?qb.valueOf:void 0;function dP(i,t,e){var n,o,r,s,l,a=i.constructor;switch(t){case"[object ArrayBuffer]":return Cf(i);case"[object Boolean]":case"[object Date]":return new a(+i);case"[object DataView]":return l=Cf((s=i).buffer),new s.constructor(l,s.byteOffset,s.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(h){var d=Cf(h.buffer);return new h.constructor(d,h.byteOffset,h.length)}(i);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(i);case"[object RegExp]":return(r=new(o=i).constructor(o.source,hP.exec(o))).lastIndex=o.lastIndex,r;case"[object Symbol]":return n=i,Zb?Object(Zb.call(n)):{}}}var Jb=Ts&&Ts.isMap,uP=Jb?ff(Jb):function(i){return $l(i)&&To(i)=="[object Map]"},Qb=Ts&&Ts.isSet,cP=Qb?ff(Qb):function(i){return $l(i)&&To(i)=="[object Set]"},tC="[object Arguments]",eC="[object Function]",iC="[object Object]",Oe={};function Uh(i,t,e,n,o,r){var s;if(s!==void 0)return s;if(!jh(i))return i;var l=uf(i);if(l)s=function(c){var g=c.length,f=new c.constructor(g);return g&&typeof c[0]=="string"&&aP.call(c,"index")&&(f.index=c.index,f.input=c.input),f}(i);else{var a=To(i),h=a==eC||a=="[object GeneratorFunction]";if(zb(i))return i.slice();if(a==iC||a==tC||h&&!o)s=h?{}:function(c){return typeof c.constructor!="function"||kb(c)?{}:FB(QB(c))}(i);else{if(!Oe[a])return o?i:{};s=dP(i,a)}}r||(r=new Bs);var d=r.get(i);if(d)return d;r.set(i,s),cP(i)?i.forEach(function(c){s.add(Uh(c,t,e,c,i,r))}):uP(i)&&i.forEach(function(c,g){s.set(g,Uh(c,t,e,g,i,r))});var u=l?void 0:iP(i);return function(c,g){for(var f=-1,p=c==null?0:c.length;++f<p&&g(c[f],f,c)!==!1;);}(u||i,function(c,g){u&&(c=i[g=c]),zB(s,g,Uh(c,t,e,g,i,r))}),s}Oe[tC]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object DataView]"]=Oe["[object Boolean]"]=Oe["[object Date]"]=Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe[iC]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object Symbol]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Error]"]=Oe[eC]=Oe["[object WeakMap]"]=!1;function Kh(i){return Uh(i,5)}const Ui=(i,t)=>{if(typeof i=="string"&&typeof t=="string")return i.toLocaleLowerCase().includes(t.toLocaleLowerCase());if(typeof i=="string"&&Array.isArray(t)){const e=t.length;for(let n=0;n<e;n++){const o=t[n];if(typeof o=="string"&&i.toLocaleLowerCase().includes(o.toLocaleLowerCase()))return!0}}return!1},yn=(i,t)=>Object.prototype.hasOwnProperty.call(i,t),Yh=i=>{const t=[];for(const e of i)e.conditions?t.push(...Yh(e.conditions)):(e==null?void 0:e.dataType)==="component"&&t.push(e);return t},gP=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];let nC=new Map;const fP=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"],Xh=i=>nC.get(i),oC=(i,t)=>{if(t)yn(i,"indexCode")&&(i.hrpIndexCode=i.indexCode,delete i.indexCode),yn(i,"indexCodeNum")&&(i.hrpIndexCodeNum=i.indexCodeNum,delete i.indexCodeNum),yn(i,"dataType")&&delete i.dataType;else{const{calcWays:e=[],dateCalcTypes:n=[],activeKey:o,componentId:r=""}=i;if(o===5&&(e!=null&&e.length)&&(n!=null&&n.length)&&r){const s=e[0].split("-");(s==null?void 0:s.length)>1&&s[0]==="rangeValue"&&(i.calcWays=((l,a={})=>{const{around:h,unit:d,id:u}=l;let c="";const{pageMode:g="",componentList:f=[]}=(a==null?void 0:a.graphicConfig)||{};let p=null,m=null;if(g==="design"){const v=f==null?void 0:f.find(R=>R.id===u);if(!v)return[];const{interval:C,intervalUnit:S,startTime:_,endTime:y,operate:w,useCurrentTime:A}=v||{};if(A&&(p=Vn().subtract(C,S),m=Vn()),_&&(p=Vn(_)),y&&(m=Vn(y)),w){const{type:R,value:x,mode:M}=w;switch(R){case"add":p=p&&p.add(x,M),m=m&&m.add(x,M);break;case"minus":p=p&&p.subtract(x,M),m=m&&m.subtract(x,M)}}}else{const v=Xh(u)||{};Di(v.startTime)&&(p=Vn(Di(v.startTime))),Di(v.endTime)&&(m=Vn(Di(v.endTime)))}return p&&m&&(c=`${h==="before"?"-":""}${m.diff(p,d.toLowerCase())+1}`),c?[c]:[]})({around:s[1],unit:n[0],id:r})),delete i.radioValue}if(yn(i,"dataType")){if(i.fieldType==="DATE"&&(i.label=i.fieldName),i.dataType==="component")if(i.fieldValue==="PARENT"){let s=i.modelKey;s&&i.prop&&(s+=`-${i.prop}`),i.fieldValue="${"+s+"}"}else i.fieldValue="${"+i.fieldValue+"}";delete i.dataType}yn(i,"activeKey")&&delete i.activeKey,yn(i,"radioValue")&&delete i.radioValue,yn(i,"indexCode")&&(i.hrpIndexCode=i.indexCode,delete i.indexCode),yn(i,"indexCodeNum")&&(i.hrpIndexCodeNum=i.indexCodeNum,delete i.indexCodeNum),i.dataType!=="component"&&i.useCurrentTime&&(i.fieldValue=Vn().format(i.dateFormat)),yn(i,"modelKey")&&delete i.modelKey,yn(i,"prop")&&delete i.prop,delete i.useCurrentTime}},Ir=(i,t)=>{const e=[];return i!=null&&i.length&&Kh(i).forEach(n=>{if(n.join&&n.conditions){const o=!n.conditions.some(r=>r.join&&r.conditions);n.conditions.forEach((r,s)=>{oC(r,t);const l={};if(s<n.conditions.length-1&&(l.join=n.join),o)e.push(Object.assign(Object.assign({},l),r));else if(r.join&&r.conditions){const a=t?"sqlConditions":"conditions";e.push(Object.assign({[a]:Ir([r],t)},l))}else e.push(Object.assign(Object.assign({},l),r))})}else oC(n,t),e.push(n)}),e},yf=(i={},t)=>{if(i!=null&&i.sortCpnts&&t){const _=lC(i);_&&(t.sort=_)}const{label:e,name:n,location:o,show:r,indexCode:s,indexCodeNum:l,calcType:a="COLUMN",builtInFormula:h,builtInValueSource:d,builtInCalcWay:u,formula:c,conditions:g,aggregate:f,distinct:p,dimByCount:m,dataTo:v}=i;let C;if(g&&(C=Ir(g)),a==="COMPONENT"){const _={};return qh(_,d),{label:e.trim(),columnName:n,show:r,calcType:a,componentAlias:u,componentValue:_.fieldValue||null}}const S={label:e.trim(),columnName:n,location:o,show:r,calcType:v==="1"?"VIEW":a,hrpIndexCode:s,hrpIndexCodeNum:l,aggregate:f,builtInFormula:h,builtInValueSource:d,formula:c,conditions:C};if(h!=="DATE_OFFSET")return n==="the_count"&&(S.calcType="AGGREGATE",S.distinct=!!p,S.typeGuid=m),Object.assign(Object.assign({},S),{builtInCalcWay:u});{const _=u.split("-");if((_==null?void 0:_.length)===3){let y=_[0];return _[2]==="before"&&_[0]!=="0"&&(y=`-${_[0]}`),Object.assign(Object.assign({},S),{calcWays:[y],dateCalcTypes:[_[1]]})}}},pP=i=>{if(!i)return[];const t=Kh((i==null?void 0:i.controlList)||[]).filter(f=>f.conditionKey!=="parentCode"),{classificationList:e=[],rowHeaderList:n=[],dimensionList:o=[],seriesList:r=[],leftAxisList:s=[],rightAxisList:l=[],queryColumnList:a=[],indicators:h=[]}=i;sC(t);const d=[...e,...n,...o,...r,...s,...l,...a,...h],u=[];for(const f of d){const p=Yh((f==null?void 0:f.conditions)||[]);if(p!=null&&p.length){const m=p.filter(v=>(v==null?void 0:v.dataType)==="component").map(v=>{const C={};return v!=null&&v.dateFormat&&(C.format=v.dateFormat),v.fieldValue==="PARENT"&&(C.id="PARENT",C.keyName=v.modelKey,C.modelKey=v.modelKey,C.prop=v.prop),Object.assign({conditionKey:v.fieldName,conditionLabel:v.fieldName,conditionName:v.fieldName,conditionValueType:v.fieldType,id:v.componentId,keyName:v.fieldValue,rule:v.rule,notGlobal:!0,indexCode:v.indexCode,typeGuid:v.typeGuid,indexCodeNum:v.indexCodeNum},C)});if(m!=null&&m.length)for(const v of m)u.find(C=>C.keyName===v.keyName)||u.push(v)}}const c=u.length,g=t;for(let f=0;f<c;f++){const p=u[f];if((p==null?void 0:p.conditionKey)==="parentCode")continue;const{id:m,keyName:v,prop:C,format:S,modelKey:_,dataType:y="component",customValue:w}=p,A=rC(p);qh(A,m,{prop:C,dateFormat:S,modelKey:_,keyName:v}),y===""&&(A.fieldValue=w||""),g.push(A)}for(let f=g.length-1;f>=0;f--){const p=g[f];p.globalCondition||Yh(g).find(m=>m.alias===p.alias&&m.globalCondition)&&g.splice(f,1)}return g};function rC(i){const{id:t,keyName:e,conditionLabel:n,conditionKey:o,conditionValueType:r,prop:s,rule:l="NONE",notGlobal:a=!1,indexCode:h,typeGuid:d,indexCodeNum:u,dataType:c="component"}=i;let g=e||t;g&&s&&(g+=`-${s}`);let f=l;return f==="NONE"&&(f=["startTime","endTime"].includes(s)?s==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":e!=null&&e.includes("startTime")?s==="GREATER_EQUAL":e!=null&&e.includes("endTime")?s==="LESS_EQUAL":"EQUAL"),t==="PARENT"&&(g=i.modelKey,g&&s&&(g+=`-${s}`),f=l),{rule:f,label:n,fieldName:o,fieldValue:"",valueType:r,alias:g,globalCondition:!a,indexCode:h,typeGuid:d,indexCodeNum:u,dataType:c}}function sC(i){if(i!=null&&i.length)for(const t of i)if(t!=null&&t.conditions)sC(t.conditions);else{const{id:e,keyName:n,prop:o,modelKey:r,format:s,dataType:l="component",customValue:a}=t,h=rC(t);qh(h,e,{prop:o,dateFormat:s,modelKey:r,keyName:n}),l===""&&(h.fieldValue=a||"");for(const d in h)t[d]=h[d];for(const d of fP)delete t[d]}}function qh(i,t,e){const{prop:n="",dateFormat:o="",modelKey:r="",keyName:s="",operateValue:l,operateMode:a,operateType:h}=e||{},d=r||s;if(t==="PARENT"&&d&&n){const C=window.config.record;let S=n,_=o;const y=n.match(/\{(.+?)\}/g);if(y!=null&&y.length){const w=y[0].slice(1,-1).trim();S=n.replace(y[0],""),_=w,i.dateFormat=_}if(C&&C[d]){const w=Di(C[d][S]);Vn.isDayjs(w)?i.fieldValue=w.format(_||"YYYY-MM-DD"):i.fieldValue=w}return}const u=Xh(t)||{},{value:c,format:g="YYYY-MM-DD",type:f="",useCurrentTime:p,RECORD:m}=u||{},v=o||g;if(Ui(f,"date")){let C;if(C=p?c?Di(c):Vn():Di(c),typeof C=="string"&&(C=Vn(C)),l&&a&&h)switch(h){case"add":C=C.add(l,a);break;case"minus":C=C.subtract(l,a)}i.fieldValue=C==null?void 0:C.format(v),i.dateFormat=v}else if(Ui(f,"rangepicker")){let C=n;if(!n){const _=s&&s.split("-");_!=null&&_.length&&(C=_[_.length-1])}if(!C)return;let S=null;if(Di(u[C])&&(S=Vn(Di(u[C]))),l&&a&&h){if(l==="rangeValue"){if(u.startTime&&u.endTime){const _=Di(u.endTime).diff(Di(u.startTime),a)+1;switch(h){case"add":S=S&&S.add(_,a);break;case"minus":S=S&&S.subtract(_,a)}}}else if(!isNaN(+l))switch(h){case"add":S=S&&S.add(l,a);break;case"minus":S=S&&S.subtract(l,a)}}if(S&&(i.fieldValue=S==null?void 0:S.format(v)),C==="rangeValue"&&u.startTime&&u.endTime){const _=function(y){const w=y.split("-");let A="";if(w!=null&&w.length)switch(w[w.length-1]){case"YYYY":A="year";break;case"MM":A="month";break;case"DD":A="day"}return A}(v);_&&(i.fieldValue=Di(u.endTime).diff(Di(u.startTime),_)+1)}i.dateFormat=v}else Ui(f,gP)?i.fieldValue=r&&m?m[r]:!r&&m?m.value:Di(c):i.fieldValue=Di(c)}const Zh=i=>{var t;if(i){const e=Array.isArray(i)?Kh(i):[Kh(i)];let n="",o=[];const r=[],s=[],l=[];for(const a of e){if(a.defaultCode&&(a.label=a.columnName,delete a.defaultCode),a.type==="CUSTOM"&&(o=a.customOrderColumns),n=a.type,r.push(a.label),(t=a.columnName)===null||t===void 0?void 0:t.includes("_ecanrepeat_")){const h=a.columnName.split("_ecanrepeat_");s.push(h[0])}else s.push(a.columnName);l.push(a.order)}return n!=="CUSTOM"&&(r==null?void 0:r.length)>1&&(n="COMBINATION"),n==="CUSTOM"?{label:r.join(","),columnName:s.join(","),type:n,customOrderColumns:o}:{label:r.join(","),columnName:s.join(","),order:l.join(","),type:n}}return i},lC=i=>{const{sortCpnts:t=[]}=i;let e,n="";for(const o of t){const r=Xh(o)||{},{type:s,RECORD:l}=r;if(Ui(s,"image")&&Ui(l==null?void 0:l.value,["asc","desc"])){n=l.value.toUpperCase();break}}return n&&(e={label:i.label,columnName:i.name,order:n,type:"NORMAL"}),e},aC=(i,t={})=>{var e,n,o,r,s,l,a,h;const{graphicConfig:d,type:u,globalModel:c,isGroupTable:g=!1}=i;c&&(nC=c);const f=Ui(u,"pivottable");let p,{source:m,dataViewId:v,plugin:C="1",layer:S,chartType:_,classificationList:y=[],rowHeaderList:w=[],dimensionList:A=[],seriesList:R=[],leftAxisList:x=[],rightAxisList:M=[],queryColumnList:T=[],indicators:B=[],controlList:H=[],formFields:k={},variableList:P=[],variableConditions:E=[],dataSourceId:F="",idxLibMode:I,preview:L=!1,edvDataSetId:D}=d||{},O=[];if((d==null?void 0:d.pageMode)==="design"?(O=((e=d.sqlConditions)!==null&&e!==void 0?e:[]).map(G=>{const q={};if(yn(G,"globalCondition")||G.join||(q.globalCondition=!0),!G.join){const ot=G.rule||"EQUAL";q.rule=ot==="NONE"?"EQUAL":ot}return Object.assign(Object.assign({},G),q)}),E!=null&&E.length&&(O=O.concat(E))):(O=pP(d),P!=null&&P.length&&(O=O.concat(function(G){const q=[];if(G!=null&&G.length){for(const ot of G)if(ot.variableName){const ct={variateName:ot.variableName,globalCondition:!1,valueType:ot.variableType,alias:ot.keyName||""};qh(ct,ot.id,{dateFormat:ot.format,prop:ot.dateTypeValue,keyName:ot.keyName,operateType:ot.operateType,operateMode:ot.operateMode,operateValue:ot.operateValue}),ot.dataType===""&&(ct.fieldValue=ot.variableValue),ot.format&&(ct.dateFormat=ot.format),ot.label&&(ct.label=ot.label),q.push(ct)}}return q}(P)))),O==null?void 0:O.length){const G=O.filter(ot=>ot.globalCondition),q=O.filter(ot=>!ot.globalCondition);(G==null?void 0:G.length)>1&&(O=[{join:"&&",conditions:G},...q])}O!=null&&O.length&&(O=Ir(O,"1")),S==null&&(S=Ui(u,["table","card"])||Ui(u,["list","circulate"])&&(y==null?void 0:y.length)>1?"1":Ui(u,["select","checkbox","radio"])?"3":"2");const V=[];let W,j="";if(Array.isArray(y)&&y.length>0&&(!["ecanList","ecanCirculate"].includes(u)||(y==null?void 0:y.length)===1)){const G=y.length;for(let q=0;q<G;q++){const ot=y[q]||{},{label:ct="",name:_t="",show:yt=!1,sort:ht,customGroup:et,conditions:mt,dateFormat:st,typeGuid:Ft="",truncations:Ht=[]}=ot;if(yt||G===1){j=Ft,p={label:ct.trim(),columnName:_t,show:yt,sort:lC(ot)||Zh(ht)||ht,customGroup:et,conditions:Ir(mt),typeGuid:Ft},st&&(p.dateFormat=st),_t!=="the_date"||p.dateFormat||(p.dateFormat="YYYY-MM");const vt={};if(Array.isArray(Ht)&&Ht.length>0){const Pt=Ht.length;for(let _e=0;_e<Pt;_e++){const ge=Ht[_e]||{},{rule:gt="",num:Le=0,name:Fe=""}=ge;gt&&Le&&(vt.num=Le,vt.rule=gt,Fe&&(vt.otherGroupName=Fe))}}if(!((n=Object.keys(vt))===null||n===void 0)&&n.length&&(p.truncation=vt),!Ui(u,["scatter","valueline"]))break;V.push(p)}}}if(Array.isArray(R)&&R.length>0){const G=R.length;for(let q=0;q<G;q++){const ot=R[q]||{},{label:ct="",name:_t="",show:yt=!1,sort:ht,customGroup:et,conditions:mt,typeGuid:st}=ot;if(yt||G===1){W={label:ct.trim(),columnName:_t,show:yt,sort:Zh(ht),customGroup:et,conditions:Ir(mt),typeGuid:st};break}}}const $=[];x==null||x.forEach(G=>{G.location="LEFT",$.push(yf(G,p))}),M==null||M.forEach(G=>{G.location="RIGHT",$.push(yf(G,p))});let X=B;t!=null&&t.pivotTableCal&&(X=((o=t.pivotTableCal)===null||o===void 0?void 0:o.indicators)||[]),X==null||X.forEach(G=>{G.location="LEFT",$.push(yf(G,p))});const K=[];["ecanList","ecanCirculate"].includes(u)&&(y==null?void 0:y.length)>1&&(T=y),t!=null&&t.pivotTableCal&&(T=((r=t.pivotTableCal)===null||r===void 0?void 0:r.dimensions)||[]),T==null||T.forEach(G=>{const{label:q,name:ot,location:ct,show:_t,indexCode:yt,sort:ht,typeGuid:et,indexCodeNum:mt,dateFormat:st,conditions:Ft}=G;let Ht=Zh(ht);if(t.sort){const{field:Pt,order:_e}=t.sort;let ge=$.find(gt=>gt.label===Pt);ge||q!==Pt||(ge=G),ge&&(Ht={columnName:ge.columnName,label:t.sort.field,order:_e.toUpperCase(),type:"NORMAL"})}const vt={label:q,columnName:ot,location:ct,show:_t,sort:Ht,calcType:"COLUMN",hrpIndexCode:yt,hrpIndexCodeNum:mt,conditions:Ir(Ft),typeGuid:et};st&&(vt.dateFormat=st),ot!=="the_date"||vt.dateFormat||(vt.dateFormat="YYYY-MM"),K.push(vt)});let U=[],Q=[];if(Array.isArray(w)&&w.length>0?Q=w:Array.isArray(A)&&A.length>0&&(Q=A),Q==null?void 0:Q.length){const G=Q.length;for(let q=0;q<G;q++){const ot=Q[q]||{},{label:ct="",name:_t="",show:yt=!1,sort:ht,customGroup:et,conditions:mt,truncations:st,typeGuid:Ft="",dateFormat:Ht}=ot;let vt=Zh(ht);if(t.sort){const{field:ge,order:gt}=t.sort;let Le=$.find(Fe=>Fe.label===ge);Le||ot.label!==ge||(Le=ot),Le&&(vt={columnName:Le.columnName,label:t.sort.field,order:gt.toUpperCase(),type:"NORMAL"})}const Pt={label:ct.trim(),columnName:_t,show:yt,sort:vt,customGroup:et,conditions:Ir(mt),typeGuid:Ft};Ht&&(Pt.dateFormat=Ht),_t!=="the_date"||Pt.dateFormat||(Pt.dateFormat="YYYY-MM");const _e={};if(Array.isArray(st)&&st.length>0){const ge=st.length;for(let gt=0;gt<ge;gt++){const Le=st[gt]||{},{rule:Fe="",num:me=0,name:Ve=""}=Le;Fe&&me&&(_e.num=me,_e.rule=Fe,Ve&&(_e.otherGroupName=Ve))}}!((s=Object.keys(_e))===null||s===void 0)&&s.length&&(Pt.truncation=_e),U.push(Pt)}}let dt,pt,xt=[];if(t!=null&&t.pivotTableCal){let G=[];const{calc:q=[],filter:ot=[],truncations:ct=[],sorts:_t=[],aggregateMethod:yt=[],rowDimensionKeys:ht=[],colDimensionKeys:et=[]}=t.pivotTableCal;if($.push(...q),ot==null?void 0:ot.length)for(const mt of ot){const{type:st}=mt,Ft=hb(mt,["type"]);st==="indicators"?G=$:st==="dimension"&&(G=K);const Ht=G.find(vt=>vt.columnName===mt.fieldName);Ht&&(Ht.conditions||(Ht.conditions=[]),Ht.conditions.push(Ft))}if(ct!=null&&ct.length)for(const mt of ct){const st=K.find(Ft=>Ft.columnName===mt.key);st&&(st.truncation={num:mt.num,rule:mt.rule})}if(_t!=null&&_t.length)for(const mt of _t){const{fieldType:st,columnData:Ft}=mt,Ht=hb(mt,["fieldType","columnData"]);st==="indicators"?(G=$,dt=Ft):st==="dimension"&&(G=K);const vt=G.find(Pt=>Pt.label===Ht.label);vt&&(vt.sort=Object.assign(Object.assign({},Ht),{columnName:vt.columnName}))}if(!((l=Object.keys(yt))===null||l===void 0)&&l.length)for(const mt in yt){const st=K.find(Ft=>Ft.label===mt);st&&(!((a=yt[mt])===null||a===void 0)&&a.length)&&(st.aggregateMethod=yt[mt])}U=[],xt=[];for(const mt of K)ht.includes(mt.columnName)?U.push(mt):et.includes(mt.columnName)&&xt.push(mt)}if(Ui(u,["text","proportion","counter"])?_="zb":Ui(u,["valueline"])&&(_="valueline"),g||u==="card"){if(U.length===0||$.length===0)return;_="grouptable"}else if(S==="1"&&K.length===0||S==="2"&&$.length===0||!(S!=="3"||(j||m==="EDV_DATA_SET")&&k.labelField&&k.valueField)||S==="3"&&u==="ecanDataSelect"&&$.length===0)return;if(A!=null&&A.length&&(S="1",_="grouptable"),!Ui(u,["scatter","valueline"])&&((h=Object.keys(k))===null||h===void 0?void 0:h.length)){const G=Yh(H).find(ot=>ot.conditionKey==="parentCode"),q={};if(G){const ot=Xh(G.id)||{};if(!(ot!=null&&ot.itemCodes))return;q.parentItemCodes=ot.itemCodes}u==="ecanDataSelect"&&(q.indicatorList=$.filter(ot=>ot.show)),m==="EDV_DATA_SET"&&(q.edvDataSetId=D),pt=Object.assign({url:"/diagram/formData",source:m,dataViewId:v,plugin:"4",layer:S,chartType:"normalSelect",rangeIndexTypeGuid:j,type:u==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:k.labelField,valueField:k.valueField,sqlConditions:O,idxLibMode:"WITH_DATE_DIM_TABLE",dataSourceId:F,keyName:i.keyName},q)}else{let G={};G=Ui(u,["scatter","valueline"])?{classifications:V}:{classification:p},pt=Object.assign({url:"/diagram",source:m,dataViewId:v,plugin:f?"5":C,layer:S,chartType:f?"pivot-table":_,series:W,indicatorList:$,queryColumns:g?[]:K,pageFlag:!0,edvDataSetId:D||"",sqlConditions:O.map(q=>{const{fieldValue:ot}=q,ct={};return ot&&Array.isArray(ot)&&(ct.fieldValue=JSON.stringify(ot)),Object.assign(Object.assign({},q),ct)}),idxLibMode:I,dataSourceId:F,preview:L,rowHeaders:U,keyName:i.keyName,columnData:dt,columnHeaders:xt},G)}return pt};function mP(i,t){if(i==="increase")return t=t||"#f00f00",`<svg t="1718270975854" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1021" width="64" height="64"><path d="M128 438.848h256C384 743.68 322.112 871.68 128 1024c277.312-60.864 512-158.464 512-585.152h256L512 0 128 438.848z" fill="${t}" p-id="1022"></path></svg>`;if(i==="decline")return t=t||"#00FF88",`<svg t="1718271009759" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1172" width="64" height="64"><path d="M849.5 576.29375l-225 0C624.5 308.375 678.89375 195.875 849.5 62.00000001c-243.73125 53.49375-449.99999999 139.275-450 514.29374999l-225 0L512 961.99999999 849.5 576.29375z" fill="${t}" p-id="1173"></path></svg>`}const vP=i=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标",FIELD:"数据集"})[i],bP=i=>({0:"文本",1:"数值",2:"日期"})[i],CP=i=>i==="0"?"手工录入":i==="1"?"系统取数":i==="2"?"运算加工":"",yP=i=>{let t="";switch(i){case"1":t="人力系统";break;case"2":t="绩效系统";break;case"3":t="预算系统";break;case"4":t="财务系统";break;case"5":t="成本系统";break;case"6":t="物流系统";break;case"7":t="固定资产系统";break;case"8":t="OA办公系统";break;case"9":t="电子档案系统";break;case"10":t="个人收入系统";break;case"11":t="奖金二次分配系统";break;case"12":t="财务管理系统";break;case"13":t="报销系统";break;case"14":t="科研管理系统";break;case"15":t="审计系统";break;case"16":t="分组器系统";break}return t},_P=i=>i==="0"?"指标库":i==="1"?"视图":i==="2"?"数据集":"其他";function wP(i){i=i.replace(/^#/,"");const t=parseInt(i.substr(0,2),16)/255,e=parseInt(i.substr(2,2),16)/255,n=parseInt(i.substr(4,2),16)/255,o=Math.max(t,e,n),r=Math.min(t,e,n);let s=(o+r)/2,l=s;const a=s;if(o===r)s=l=0;else{const h=o-r;switch(l=a>.5?h/(2-o-r):h/(o+r),o){case t:s=(e-n)/h+(e<n?6:0);break;case e:s=(n-t)/h+2;break;case n:s=(t-e)/h+4;break}s/=6}return[s,l,a]}function hC(i,t){let[e,n,o]=wP(i);return o=Math.min(1,Math.max(0,o+t/100)),SP(e,n,o)}function SP(i,t,e){let n,o,r;if(t===0)n=o=r=e;else{const l=(d,u,c)=>(c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?d+(u-d)*6*c:c<.5?u:c<.6666666666666666?d+(u-d)*(.6666666666666666-c)*6:d),a=e<.5?e*(1+t):e+t-e*t,h=2*e-a;n=l(h,a,i+1/3),o=l(h,a,i),r=l(h,a,i-1/3)}const s=l=>Math.round(l*255).toString(16).padStart(2,"0");return`#${s(n)}${s(o)}${s(r)}`}function xP(i){let t="";return["IDX","BUILT_IN_IDX"].includes(i)?t="indicator":["DIM","BUILT_IN_DIM"].includes(i)&&(t="dimension"),t}class ti{static GenAutoIncrementId(){return ti.auto_increment_id++}}ti.auto_increment_id=0;class jt{constructor(t){this.id=ti.GenAutoIncrementId(),this.registry=t}}const Jh="named",dC="inject",uC="multi_inject",cC="inversify:tagged",gC="inversify:paramtypes";class _f{constructor(t,e){this.key=t,this.value=e}toString(){return this.key===Jh?`named: ${String(this.value).toString()} `:`tagged: { key:${this.key.toString()}, value: ${String(this.value)} }`}}const Ps=function(i){var t;return function(e){const n=typeof Symbol=="function",o=n&&Symbol.toPrimitive!==void 0?Symbol.toPrimitive:"@@toPrimitive",r=Object.getPrototypeOf(Function),s=(typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL,Map),l=new WeakMap;function a(P,E,F,I){if(!w(F))throw new TypeError;return v(P,E,F,I)}function h(P,E,F){if(!w(E))throw new TypeError;return S(F)||(F=T(F)),g(P,E,F)}function d(P,E,F){if(!w(E))throw new TypeError;return S(F)||(F=T(F)),f(P,E,F)}function u(P,E,F){if(!w(E))throw new TypeError;return S(F)||(F=T(F)),p(P,E,F)}function c(P,E,F){let I=l.get(P);if(S(I)){if(!F)return;I=new s,l.set(P,I)}let L=I.get(E);if(S(L)){if(!F)return;L=new s,I.set(E,L)}return L}function g(P,E,F){if(f(P,E,F))return!0;const I=k(E);return!_(I)&&g(P,I,F)}function f(P,E,F){const I=c(E,F,!1);return!S(I)&&x(I.has(P))}function p(P,E,F){if(f(P,E,F))return m(P,E,F);const I=k(E);return _(I)?void 0:p(P,I,F)}function m(P,E,F){const I=c(E,F,!1);if(!S(I))return I.get(P)}function v(P,E,F,I){c(F,I,!0).set(P,E)}function C(P){if(P===null)return 1;switch(typeof P){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return P===null?1:6;default:return 6}}function S(P){return P===void 0}function _(P){return P===null}function y(P){return typeof P=="symbol"}function w(P){return typeof P=="object"?P!==null:typeof P=="function"}function A(P,E){switch(C(P)){case 0:case 1:case 2:case 3:case 4:case 5:return P}const F=E===3?"string":E===5?"number":"default",I=H(P,o);if(I!==void 0){const L=I.call(P,F);if(w(L))throw new TypeError;return L}return R(P,F==="default"?"number":F)}function R(P,E){if(E==="string"){const F=P.toString;if(B(F)){const L=F.call(P);if(!w(L))return L}const I=P.valueOf;if(B(I)){const L=I.call(P);if(!w(L))return L}}else{const F=P.valueOf;if(B(F)){const L=F.call(P);if(!w(L))return L}const I=P.toString;if(B(I)){const L=I.call(P);if(!w(L))return L}}throw new TypeError}function x(P){return!!P}function M(P){return""+P}function T(P){const E=A(P,3);return y(E)?E:M(E)}function B(P){return typeof P=="function"}function H(P,E){const F=P[E];if(F!=null){if(!B(F))throw new TypeError;return F}}function k(P){const E=Object.getPrototypeOf(P);if(typeof P!="function"||P===r||E!==r)return E;const F=P.prototype,I=F&&Object.getPrototypeOf(F);if(I==null||I===Object.prototype)return E;const L=I.constructor;return typeof L!="function"||L===P?E:L}e("defineMetadata",a),e("hasMetadata",h),e("hasOwnMetadata",d),e("getMetadata",u)}((t=i,function(e,n){typeof t[e]!="function"&&Object.defineProperty(t,e,{configurable:!0,writable:!0,value:n})})),i}({});function RP(i,t,e,n){const o=[n];let r={};Ps.hasOwnMetadata(i,t)&&(r=Ps.getMetadata(i,t));let s=r[e];s===void 0&&(s=[]),s.push(...o),r[e]=s,Ps.defineMetadata(i,r,t)}function AP(i,t,e,n){RP(cC,i,e.toString(),n)}function fC(i){return(t,e,n)=>{AP(t,e,n,i)}}function pC(i){return t=>(e,n,o)=>fC(new _f(i,t))(e,n,o)}const te=pC(dC),mC=pC(uC);function Ct(){return function(i){return Ps.defineMetadata(gC,null,i),i}}function di(i){return fC(new _f(Jh,i))}const Dr={Singleton:"Singleton",Transient:"Transient"},rr={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};class wf{constructor(t,e){this.id=ti.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=rr.Invalid,this.constraint=n=>!0,this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}clone(){const t=new wf(this.serviceIdentifier,this.scope);return t.activated=t.scope===Dr.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.provider=this.provider,t.constraint=this.constraint,t.cache=this.cache,t}}class TP{getConstructorMetadata(t){return{compilerGeneratedMetadata:Ps.getMetadata(gC,t),userGeneratedMetadata:Ps.getMetadata(cC,t)||{}}}getPropertiesMetadata(t){throw new Error("暂未实现")}}const MP=(i=>t=>{const e=n=>{if(n==null)return!1;if(n.key===i&&n.value===t)return!0;if(n.constructorArgsMetadata==null)return!1;const o=n.constructorArgsMetadata;for(let r=0;r<o.length;r++)if(o[r].key===i&&o[r].value===t)return!0;return!1};return e.metaData=new _f(i,t),e})(Jh);class Qh{constructor(t){this._binding=t}inRequestScope(){throw new Error("暂未实现")}inSingletonScope(){return this._binding.scope=Dr.Singleton,this}inTransientScope(){return this._binding.scope=Dr.Transient,this}whenTargetNamed(t){return this._binding.constraint=MP(t),this}}class BP{constructor(t){this._binding=t}to(t){return this._binding.type=rr.Instance,this._binding.implementationType=t,new Qh(this._binding)}toSelf(){const t=this._binding.serviceIdentifier;return this.to(t)}toDynamicValue(t){return this._binding.type=rr.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new Qh(this._binding)}toConstantValue(t){return this._binding.type=rr.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Dr.Singleton,new Qh(this._binding)}toFactory(t){return this._binding.type=rr.Factory,this._binding.factory=t,this._binding.scope=Dr.Singleton,new Qh(this._binding)}toService(t){this.toDynamicValue(e=>e.container.get(t))}}let PP=class{constructor(t){const e=t||{};e.defaultScope=e.defaultScope||Dr.Transient,this.options=e,this.id=ti.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new TP}load(t){const e=this._getContainerModuleHelpersFactory()(t.id);t.registry(e.bindFunction,e.unbindFunction,e.isboundFunction,e.rebindFunction)}get(t){const e=this._getNotAllArgs(t,!1);return this._get(e)}getAll(t){const e=this._getAllArgs(t);return this._get(e)}getTagged(t,e,n){const o=this._getNotAllArgs(t,!1,e,n);return this._get(o)}getNamed(t,e){return this.getTagged(t,Jh,e)}isBound(t){return this._bindingDictionary.has(t)}bind(t){const e=this.options.defaultScope,n=new wf(t,e),o=this._bindingDictionary.get(t)||[];return o.push(n),this._bindingDictionary.set(t,o),new BP(n)}unbind(t){this._bindingDictionary.delete(t)}rebind(t){return this.unbind(t),this.bind(t)}_getContainerModuleHelpersFactory(){const t=(s,l)=>{s._binding.moduleId=l},e=s=>l=>{const a=this.bind(l);return t(a,s),a},n=()=>s=>this.unbind(s),o=()=>s=>this.isBound(s),r=s=>l=>{const a=this.rebind(l);return t(a,s),a};return s=>({bindFunction:e(s),isboundFunction:o(),rebindFunction:r(s),unbindFunction:n(),unbindAsyncFunction:l=>null})}_getNotAllArgs(t,e,n,o){return{avoidConstraints:!1,isMultiInject:e,serviceIdentifier:t,key:n,value:o}}_getAllArgs(t){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t}}_get(t){const e=[];return this._bindingDictionary.get(t.serviceIdentifier).filter(n=>n.constraint(t)).forEach(n=>{e.push(this._resolveFromBinding(n))}),t.isMultiInject||e.length!==1?e:e[0]}_getChildRequest(t){const e=t.implementationType,{userGeneratedMetadata:n}=this._metadataReader.getConstructorMetadata(e),o=Object.keys(n),r=[];for(let s=0;s<o.length;s++){const l=n[s],a={};l.forEach(g=>{a[g.key]=g.value});const h={inject:a[dC],multiInject:a[uC]},d=h.inject||h.multiInject,u={serviceIdentifier:d,constructorArgsMetadata:l},c={injectIdentifier:d,metadata:l,bindings:this._bindingDictionary.get(d).filter(g=>g.constraint(u))};r.push(c)}return r}_resolveFromBinding(t){const e=this._getResolvedFromBinding(t);return this._saveToScope(t,e),e}_getResolvedFromBinding(t){let e;switch(t.type){case rr.ConstantValue:case rr.Function:e=t.cache;break;case rr.Instance:e=this._resolveInstance(t,t.implementationType);break;default:e=t.dynamicValue({container:this})}return e}_resolveInstance(t,e){if(t.activated)return t.cache;const n=this._getChildRequest(t);return this._createInstance(e,n)}_createInstance(t,e){return e.length?new t(...this._resolveRequests(e)):new t}_resolveRequests(t){return t.map(e=>e.bindings.length>1?e.bindings.map(n=>this._resolveFromBinding(n)):this._resolveFromBinding(e.bindings[0]))}_saveToScope(t,e){t.scope===Dr.Singleton&&(t.cache=e,t.activated=!0)}};const ei=Symbol("ContributionProvider");class vC{constructor(t,e){this.serviceIdentifier=t,this.container=e}getContributions(){return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&this.caches.push(...this.container.getAll(this.serviceIdentifier))),this.caches}}function Mi(i,t){i(ei).toDynamicValue(({container:e})=>new vC(t,e)).inSingletonScope().whenTargetNamed(t)}function HP(i,t){i(ei).toDynamicValue(({container:e})=>new vC(t,e)).whenTargetNamed(t)}class EP{constructor(t,e){this._args=t,this.name=e,this.taps=[]}tap(t,e){this._tap("sync",t,e)}unTap(t,e){const n=typeof t=="string"?t.trim():t.name;n&&(this.taps=this.taps.filter(o=>!(o.name===n&&(!e||o.fn===e))))}_parseOptions(t,e,n){let o;if(typeof e=="string")o={name:e.trim()};else if(typeof e!="object"||e===null)throw new Error("Invalid tap options");if(typeof o.name!="string"||o.name==="")throw new Error("Missing name for tap");return o=Object.assign({type:t,fn:n},o),o}_tap(t,e,n){this._insert(this._parseOptions(t,e,n))}_insert(t){let e;typeof t.before=="string"?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;typeof t.stage=="number"&&(n=t.stage);let o=this.taps.length;for(;o>0;){o--;const r=this.taps[o];this.taps[o+1]=r;const s=r.stage||0;if(e){if(e.has(r.name)){e.delete(r.name);continue}if(e.size>0)continue}if(!(s>n)){o++;break}}this.taps[o]=t}}class Ki extends EP{call(...t){this.taps.map(e=>e.fn).forEach(e=>e(...t))}}const td=Symbol.for("EnvContribution"),Sf=Symbol.for("VGlobal");var kP=globalThis&&globalThis.__decorate||function(i,t,e,n){var o,r=arguments.length,s=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,t,e,n);else for(var l=i.length-1;l>=0;l--)(o=i[l])&&(s=(r<3?o(s):r>3?o(t,e,s):o(t,e))||s);return r>3&&s&&Object.defineProperty(t,e,s),s},LP=globalThis&&globalThis.__metadata||function(i,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,t)},bC=globalThis&&globalThis.__param||function(i,t){return function(e,n){t(e,n,i)}};let xf=class{get env(){return this._env}get devicePixelRatio(){return this._env||this.setEnv("browser"),this.envContribution.getDevicePixelRatio()}get supportEvent(){return this._env||this.setEnv("browser"),this.envContribution.supportEvent}set supportEvent(i){this._env||this.setEnv("browser"),this.envContribution.supportEvent=i}get supportsTouchEvents(){return this._env||this.setEnv("browser"),this.envContribution.supportsTouchEvents}set supportsTouchEvents(i){this._env||this.setEnv("browser"),this.envContribution.supportsTouchEvents=i}get supportsPointerEvents(){return this._env||this.setEnv("browser"),this.envContribution.supportsPointerEvents}set supportsPointerEvents(i){this._env||this.setEnv("browser"),this.envContribution.supportsPointerEvents=i}get supportsMouseEvents(){return this._env||this.setEnv("browser"),this.envContribution.supportsMouseEvents}set supportsMouseEvents(i){this._env||this.setEnv("browser"),this.envContribution.supportsMouseEvents=i}get applyStyles(){return this._env||this.setEnv("browser"),this.envContribution.applyStyles}set applyStyles(i){this._env||this.setEnv("browser"),this.envContribution.applyStyles=i}constructor(i){this.contributions=i,this.id=ti.GenAutoIncrementId(),this.hooks={onSetEnv:new Ki(["lastEnv","env","global"])},this.measureTextMethod="native",this.optimizeVisible=!1}bindContribution(i){const t=[];if(this.contributions.getContributions().forEach(e=>{const n=e.configure(this,i);n&&n.then&&t.push(n)}),t.length)return Promise.all(t)}getDynamicCanvasCount(){return this._env||this.setEnv("browser"),this.envContribution.getDynamicCanvasCount()}getStaticCanvasCount(){return this._env||this.setEnv("browser"),this.envContribution.getStaticCanvasCount()}setEnv(i,t){if(t&&t.force===!0||this._env!==i)return this.deactiveCurrentEnv(),this.activeEnv(i,t)}deactiveCurrentEnv(){this.envContribution&&this.envContribution.release()}activeEnv(i,t){const e=this._env;this._env=i;const n=this.bindContribution(t);if(n&&n.then)return n.then(()=>{this.envParams=t,this.hooks.onSetEnv.call(e,i,this)});this.envParams=t,this.hooks.onSetEnv.call(e,i,this)}setActiveEnvContribution(i){this.envContribution=i}createCanvas(i){return this._env||this.setEnv("browser"),this.envContribution.createCanvas(i)}createOffscreenCanvas(i){return this._env||this.setEnv("browser"),this.envContribution.createOffscreenCanvas(i)}releaseCanvas(i){return this._env||this.setEnv("browser"),this.envContribution.releaseCanvas(i)}addEventListener(i,t,e){return this._env||this.setEnv("browser"),this.envContribution.addEventListener(i,t,e)}removeEventListener(i,t,e){return this._env||this.setEnv("browser"),this.envContribution.removeEventListener(i,t,e)}dispatchEvent(i){return this._env||this.setEnv("browser"),this.envContribution.dispatchEvent(i)}getRequestAnimationFrame(){return this._env||this.setEnv("browser"),this.envContribution.getRequestAnimationFrame()}getCancelAnimationFrame(){return this._env||this.setEnv("browser"),this.envContribution.getCancelAnimationFrame()}getElementById(i){return this._env||this.setEnv("browser"),this.envContribution.getElementById?this.envContribution.getElementById(i):null}getRootElement(){return this._env||this.setEnv("browser"),this.envContribution.getRootElement?this.envContribution.getRootElement():null}getDocument(){return this._env||this.setEnv("browser"),this.envContribution.getDocument?this.envContribution.getDocument():null}mapToCanvasPoint(i,t){return this._env||this.setEnv("browser"),this.envContribution.mapToCanvasPoint?this.envContribution.mapToCanvasPoint(i,t):null}loadImage(i){return this._env||this.setEnv("browser"),this.envContribution.loadImage(i)}loadSvg(i){return this._env||this.setEnv("browser"),this.envContribution.loadSvg(i)}loadJson(i){return this._env||this.setEnv("browser"),this.envContribution.loadJson(i)}loadArrayBuffer(i){return this._env||this.setEnv("browser"),this.envContribution.loadArrayBuffer(i)}loadBlob(i){return this._env||this.setEnv("browser"),this.envContribution.loadBlob(i)}isChrome(){return this._isChrome!=null||(this._env||this.setEnv("browser"),this._isChrome=this._env==="browser"&&navigator.userAgent.indexOf("Chrome")>-1),this._isChrome}isSafari(){return this._isSafari!=null||(this._env||this.setEnv("browser"),this._isSafari=this._env==="browser"&&/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)),this._isSafari}getNativeAABBBounds(i){return this._env||this.setEnv("browser"),this.envContribution.getNativeAABBBounds(i)}removeDom(i){return this._env||this.setEnv("browser"),this.envContribution.removeDom(i)}createDom(i){return this._env||this.setEnv("browser"),this.envContribution.createDom(i)}updateDom(i,t){return this._env||this.setEnv("browser"),this.envContribution.updateDom(i,t)}getElementTop(i,t=!1){return this._env||this.setEnv("browser"),this.envContribution.getElementTop(i,t)}getElementLeft(i,t=!1){return this._env||this.setEnv("browser"),this.envContribution.getElementLeft(i,t)}getElementTopLeft(i,t=!1){return this._env||this.setEnv("browser"),this.envContribution.getElementTopLeft(i,t)}};xf=kP([Ct(),bC(0,te(ei)),bC(0,di(td)),LP("design:paramtypes",[Object])],xf);var FP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Or={},IP={get exports(){return Or},set exports(i){Or=i}};(function(i){var t=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function o(a,h,d){this.fn=a,this.context=h,this.once=d||!1}function r(a,h,d,u,c){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new o(d,u||a,c),f=e?e+h:h;return a._events[f]?a._events[f].fn?a._events[f]=[a._events[f],g]:a._events[f].push(g):(a._events[f]=g,a._eventsCount++),a}function s(a,h){--a._eventsCount===0?a._events=new n:delete a._events[h]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],d,u;if(this._eventsCount===0)return h;for(u in d=this._events)t.call(d,u)&&h.push(e?u.slice(1):u);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},l.prototype.listeners=function(h){var d=e?e+h:h,u=this._events[d];if(!u)return[];if(u.fn)return[u.fn];for(var c=0,g=u.length,f=new Array(g);c<g;c++)f[c]=u[c].fn;return f},l.prototype.listenerCount=function(h){var d=e?e+h:h,u=this._events[d];return u?u.fn?1:u.length:0},l.prototype.emit=function(h,d,u,c,g,f){var p=e?e+h:h;if(!this._events[p])return!1;var m=this._events[p],v=arguments.length,C,S;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),v){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,u),!0;case 4:return m.fn.call(m.context,d,u,c),!0;case 5:return m.fn.call(m.context,d,u,c,g),!0;case 6:return m.fn.call(m.context,d,u,c,g,f),!0}for(S=1,C=new Array(v-1);S<v;S++)C[S-1]=arguments[S];m.fn.apply(m.context,C)}else{var _=m.length,y;for(S=0;S<_;S++)switch(m[S].once&&this.removeListener(h,m[S].fn,void 0,!0),v){case 1:m[S].fn.call(m[S].context);break;case 2:m[S].fn.call(m[S].context,d);break;case 3:m[S].fn.call(m[S].context,d,u);break;case 4:m[S].fn.call(m[S].context,d,u,c);break;default:if(!C)for(y=1,C=new Array(v-1);y<v;y++)C[y-1]=arguments[y];m[S].fn.apply(m[S].context,C)}}return!0},l.prototype.on=function(h,d,u){return r(this,h,d,u,!1)},l.prototype.once=function(h,d,u){return r(this,h,d,u,!0)},l.prototype.removeListener=function(h,d,u,c){var g=e?e+h:h;if(!this._events[g])return this;if(!d)return s(this,g),this;var f=this._events[g];if(f.fn)f.fn===d&&(!c||f.once)&&(!u||f.context===u)&&s(this,g);else{for(var p=0,m=[],v=f.length;p<v;p++)(f[p].fn!==d||c&&!f[p].once||u&&f[p].context!==u)&&m.push(f[p]);m.length?this._events[g]=m.length===1?m[0]:m:s(this,g)}return this},l.prototype.removeAllListeners=function(h){var d;return h?(d=e?e+h:h,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,i.exports=l})(IP);const Hs=(i,t)=>Object.prototype.toString.call(i)===`[object ${t}]`,ui=(i,t=!1)=>t?typeof i=="boolean":i===!0||i===!1||Hs(i,"Boolean"),oe=i=>typeof i=="function",Tt=i=>i==null,z=i=>i!=null,se=i=>{const t=typeof i;return i!==null&&t==="object"||t==="function"},DP=i=>typeof i=="object"&&i!==null,Es=function(i){if(!DP(i)||!Hs(i,"Object"))return!1;if(Object.getPrototypeOf(i)===null)return!0;let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t},je=i=>i===void 0,re=(i,t=!1)=>{const e=typeof i;return t?e==="string":e==="string"||Hs(i,"String")},it=i=>Array.isArray?Array.isArray(i):Hs(i,"Array"),Rf=function(i){return i!==null&&typeof i!="function"&&Number.isFinite(i.length)},CC=i=>Hs(i,"Date"),at=(i,t=!1)=>{const e=typeof i;return t?e==="number":e==="number"||Hs(i,"Number")},Se=i=>at(i)&&Number.isFinite(i),OP=i=>new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(i),zP=i=>new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(i),WP=i=>({}).toString.call(i).replace(/^\[object /,"").replace(/]$/,""),NP=Object.prototype,VP=function(i){const t=i&&i.constructor;return i===(typeof t=="function"&&t.prototype||NP)},jP=Object.prototype.hasOwnProperty;function Kt(i){if(Tt(i))return!0;if(Rf(i))return!i.length;const t=WP(i);if(t==="Map"||t==="Set")return!i.size;if(VP(i))return!Object.keys(i).length;for(const e in i)if(jP.call(i,e))return!1;return!0}const ci=(i,t,e)=>{const n=re(t)?t.split("."):t;for(let o=0;o<n.length;o++)i=i?i[n[o]]:void 0;return i===void 0?e:i},$P=Object.prototype.hasOwnProperty,yC=(i,t)=>i!=null&&$P.call(i,t);function Pe(i,t,e){let n;if(!z(i)||typeof i!="object"||t&&t(i))return i;const o=it(i),r=i.length;n=o?new Array(r):typeof i=="object"?{}:ui(i)||at(i)||re(i)?i:CC(i)?new Date(+i):void 0;const s=o?void 0:Object.keys(Object(i));let l=-1;if(n)for(;++l<(s||i).length;){const a=s?s[l]:l,h=i[a];e&&e.includes(a.toString())?n[a]=h:n[a]=Pe(h,t,e)}return n}function _C(i,t,e=!1,n=!1){if(t){if(i===t)return;if(z(t)&&typeof t=="object"){const o=Object(t),r=[];for(const a in o)r.push(a);let{length:s}=r,l=-1;for(;s--;){const a=r[++l];!z(o[a])||typeof o[a]!="object"||n&&it(i[a])?wC(i,a,o[a]):GP(i,t,a,e,n)}}}}function GP(i,t,e,n=!1,o=!1){const r=i[e],s=t[e];let l=t[e],a=!0;if(it(s)){if(n)l=[];else if(it(r))l=r;else if(Rf(r)){l=new Array(r.length);let h=-1;const d=r.length;for(;++h<d;)l[h]=r[h]}}else Es(s)?(l=r??{},typeof r!="function"&&typeof r=="object"||(l={})):a=!1;a&&_C(l,s,n,o),wC(i,e,l)}function wC(i,t,e){(e!==void 0&&!UP(i[t],e)||e===void 0&&!(t in i))&&(i[t]=e)}function UP(i,t){return i===t||Number.isNaN(i)&&Number.isNaN(t)}function St(i,...t){let e=-1;const n=t.length;for(;++e<n;)_C(i,t[e],!0);return i}function KP(i,t){if(!i||!Es(i))return i;const e={};return Object.keys(i).forEach(n=>{const o=i[n];let r=!1;t.forEach(s=>{(re(s)&&s===n||s instanceof RegExp&&n.match(s))&&(r=!0)}),r||(e[n]=o)}),e}function SC(i){return Object.prototype.toString.call(i)}function xC(i){return Object.keys(i)}function Yl(i,t,e){if(i===t)return!0;if(typeof i!=typeof t||i==null||t==null)return!1;if(Number.isNaN(i)&&Number.isNaN(t))return!0;if(SC(i)!==SC(t))return!1;if(oe(i))return!!(e!=null&&e.skipFunction);if(typeof i!="object")return!1;if(it(i)){if(i.length!==t.length)return!1;for(let r=i.length-1;r>=0;r--)if(!Yl(i[r],t[r],e))return!1;return!0}if(!Es(i))return!1;const n=xC(i),o=xC(t);if(n.length!==o.length)return!1;n.sort(),o.sort();for(let r=n.length-1;r>=0;r--)if(n[r]!=o[r])return!1;for(let r=n.length-1;r>=0;r--){const s=n[r];if(!Yl(i[s],t[s],e))return!1}return!0}function YP(i){if(!i)return[];if(Object.keys)return Object.keys(i);const t=[];for(const e in i)i.hasOwnProperty(e)&&t.push(e);return t}function XP(i,t,e){const n=YP(t);for(let o=0;o<n.length;o++){const r=n[o];(e?t[r]!=null:i[r]==null)&&(i[r]=t[r])}return i}function Af(i,t,e=!0){if(i="prototype"in i?i.prototype:i,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames){const n=Object.getOwnPropertyNames(t);for(let o=0;o<n.length;o++){const r=n[o];r!=="constructor"&&(e?t[r]!=null:i[r]==null)&&(i[r]=t[r])}}else XP(i,t,e)}function Tf(i){return z(i)?it(i)?i:[i]:[]}function zr(i){if(Rf(i))return i[i.length-1]}const Mf=(i,t)=>{var e;if(i.length===0)return;let n=i[0];for(let o=1;o<i.length;o++){const r=i[o];((e=t==null?void 0:t(r,n))!==null&&e!==void 0?e:r-n>0)&&(n=r)}return n},ed=(i,t)=>{var e;if(i.length===0)return;let n=i[0];for(let o=1;o<i.length;o++){const r=i[o];((e=t==null?void 0:t(r,n))!==null&&e!==void 0?e:r-n<0)&&(n=r)}return n};function Xl(i,t){if(!it(i)||!it(t)||i.length!==t.length)return!1;for(let e=0;e<i.length;e++)if(i[e]!==t[e])return!1;return!0}function Bf(i){if(!it(i))return[i];const t=[];for(const e of i)t.push(...Bf(e));return t}function qP(i,t,e){z(t)||(t=i,i=0),z(e)||(e=1);let n=-1;const o=0|Math.max(0,Math.ceil((t-i)/e)),r=new Array(o);for(;++n<o;)r[n]=i+n*e;return r}function ZP(i,t){return i<t?-1:i>t?1:i>=t?0:NaN}function ql(i){return Number(i)}const JP=typeof console<"u";function id(i,t,e){const n=[t].concat([].slice.call(e));JP&&console[i].apply(console,n)}var jn;(function(i){i[i.None=0]="None",i[i.Error=1]="Error",i[i.Warn=2]="Warn",i[i.Info=3]="Info",i[i.Debug=4]="Debug"})(jn||(jn={}));class xe{static getInstance(t,e){return xe._instance&&at(t)?xe._instance.level(t):xe._instance||(xe._instance=new xe(t,e)),xe._instance}static setInstance(t){return xe._instance=t}static setInstanceLevel(t){xe._instance?xe._instance.level(t):xe._instance=new xe(t)}static clearInstance(){xe._instance=null}constructor(t=jn.None,e){this._onErrorHandler=[],this._level=t,this._method=e}addErrorHandler(t){this._onErrorHandler.find(e=>e===t)||this._onErrorHandler.push(t)}removeErrorHandler(t){const e=this._onErrorHandler.findIndex(n=>n===t);e<0||this._onErrorHandler.splice(e,1)}callErrorHandler(...t){this._onErrorHandler.forEach(e=>e(...t))}canLogInfo(){return this._level>=jn.Info}canLogDebug(){return this._level>=jn.Debug}canLogError(){return this._level>=jn.Error}canLogWarn(){return this._level>=jn.Warn}level(t){return arguments.length?(this._level=+t,this):this._level}error(...t){var e;return this._level>=jn.Error&&(this._onErrorHandler.length?this.callErrorHandler(...t):id((e=this._method)!==null&&e!==void 0?e:"error","ERROR",t)),this}warn(...t){return this._level>=jn.Warn&&id(this._method||"warn","WARN",t),this}info(...t){return this._level>=jn.Info&&id(this._method||"log","INFO",t),this}debug(...t){return this._level>=jn.Debug&&id(this._method||"log","DEBUG",t),this}}xe._instance=null;function QP(i,t,e=0,n){for(Tt(n)&&(n=i.length);e<n;){const o=e+n>>>1;ZP(i[o],t)>0?n=o:e=o+1}return e}const t2=(i,t,e)=>{let n=i,o=t;for(;n<o;){const r=Math.floor((n+o)/2);e(r)>=0?o=r:n=r+1}return n},e2=1e-10,i2=1e-10;function $n(i,t,e=i2,n=e2){const o=n,r=e*Math.max(i,t);return Math.abs(i-t)<=Math.max(o,r)}function RC(i,t,e,n){return i>t&&!$n(i,t,e,n)}function AC(i,t,e,n){return i<t&&!$n(i,t,e,n)}const Zl=i=>{let t=null,e=null;return(...n)=>(t&&n.every((o,r)=>o===t[r])||(t=n,e=i(...n)),e)},rn=function(i,t,e){return i<t?t:i>e?e:i},Wr=(i,t,e)=>{let[n,o]=i;o<n&&(n=i[1],o=i[0]);const r=o-n;return r>=e-t?[t,e]:(n=Math.min(Math.max(n,t),e-r),[n,n+r])};function Pf(i,t){let e;return i>t&&(e=i,i=t,t=e),n=>Math.max(i,Math.min(t,n))}let nd=!1;try{nd=typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"}catch{nd=!1}function TC(i,t,e){let n,o,r,s,l,a,h=0,d=!1,u=!1,c=!0;const g=!t&&t!==0&&nd;if(typeof i!="function")throw new TypeError("Expected a function");function f(_){const y=n,w=o;return n=o=void 0,h=_,s=i.apply(w,y),s}function p(_,y){return g?(cancelAnimationFrame(l),requestAnimationFrame(_)):setTimeout(_,y)}function m(_){const y=_-a;return a===void 0||y>=t||y<0||u&&_-h>=r}function v(){const _=Date.now();if(m(_))return C(_);l=p(v,function(y){const w=y-h,A=t-(y-a);return u?Math.min(A,r-w):A}(_))}function C(_){return l=void 0,c&&n?f(_):(n=o=void 0,s)}function S(..._){const y=Date.now(),w=m(y);if(n=_,o=this,a=y,w){if(l===void 0)return function(A){return h=A,l=p(v,t),d?f(A):s}(a);if(u)return l=p(v,t),f(a)}return l===void 0&&(l=p(v,t)),s}return t=+t||0,se(e)&&(d=!!e.leading,u="maxWait"in e,u&&(r=Math.max(Se(e.maxWait)?e.maxWait:0,t)),c="trailing"in e?!!e.trailing:c),S.cancel=function(){l!==void 0&&function(_){if(g)return cancelAnimationFrame(_);clearTimeout(_)}(l),h=0,n=a=o=l=void 0},S.flush=function(){return l===void 0?s:C(Date.now())},S.pending=function(){return l!==void 0},S}nd=!1;function MC(i,t,e){let n=!0,o=!0;if(typeof i!="function")throw new TypeError("Expected a function");return se(e)&&(n="leading"in e?!!e.leading:n,o="trailing"in e?!!e.trailing:o),TC(i,t,{leading:n,trailing:o,maxWait:t})}function od(i,t){return e=>i*(1-e)+t*e}function n2(i,t){return function(e){return Math.round(i*(1-e)+t*e)}}function o2(i,t){const e=i.valueOf(),n=t.valueOf(),o=new Date;return r=>(o.setTime(e*(1-r)+n*r),o)}const He=1e-12,Re=Math.PI,_n=Re/2,_i=2*Re,le=2*Math.PI,ve=Math.abs,fe=Math.atan2,ii=Math.cos,sr=Math.max,Bi=Math.min,We=Math.sin,Gn=Math.sqrt,ks=Math.pow;function r2(i){return i>1?0:i<-1?Re:Math.acos(i)}function BC(i){return i>=1?_n:i<=-1?-_n:Math.asin(i)}function PC(i,t,e,n,o){let r=e,s=n;return typeof i=="number"&&typeof e=="number"&&(r=(1-o)*i+o*e),typeof t=="number"&&typeof n=="number"&&(s=(1-o)*t+o*n),{x:r,y:s}}function s2(i,t){return i[0]*t[1]-i[1]*t[0]}class Ye{constructor(t=0,e=0,n,o){this.x=0,this.y=0,this.x=t,this.y=e,this.x1=n,this.y1=o}clone(){return new Ye(this.x,this.y)}copyFrom(t){return this.x=t.x,this.y=t.y,this.x1=t.x1,this.y1=t.y1,this.defined=t.defined,this.context=t.context,this}set(t,e){return this.x=t,this.y=e,this}add(t){return at(t)?(this.x+=t,void(this.y+=t)):(this.x+=t.x,this.y+=t.y,this)}sub(t){return at(t)?(this.x-=t,void(this.y-=t)):(this.x-=t.x,this.y-=t.y,this)}multi(t){throw new Error("暂不支持")}div(t){throw new Error("暂不支持")}}class Mo{static distancePP(t,e){return Gn(ks(t.x-e.x,2)+ks(t.y-e.y,2))}static distanceNN(t,e,n,o){return Gn(ks(t-n,2)+ks(e-o,2))}static distancePN(t,e,n){return Gn(ks(e-t.x,2)+ks(n-t.y,2))}static pointAtPP(t,e,n){return new Ye((e.x-t.x)*n+t.x,(e.y-t.y)*n+t.y)}}function wn(i){return i*(Math.PI/180)}function l2(i){return 180*i/Math.PI}const a2=(i=0)=>{if(i<0)for(;i<-_i;)i+=_i;else if(i>0)for(;i>_i;)i-=_i;return i};function h2(i,t,e){return t?{x:i.x+t*Math.cos(e),y:i.y+t*Math.sin(e)}:{x:i.x,y:i.y}}function HC(i){for(;i<0;)i+=2*Math.PI;for(;i>=2*Math.PI;)i-=2*Math.PI;return i}function EC(i,t,e){if(i===null)return t;if(t===null)return i;const{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}=Hf(i,t,e);return n>=a||o<=l||r>=d||s<=h?{x1:0,y1:0,x2:0,y2:0}:{x1:Math.max(n,l),y1:Math.max(r,h),x2:Math.min(o,a),y2:Math.min(s,d)}}var Ls;(function(i){i[i.NONE=0]="NONE",i[i.BBOX1=1]="BBOX1",i[i.BBOX2=2]="BBOX2"})(Ls||(Ls={}));const Hf=(i,t,e)=>{let n=i.x1,o=i.x2,r=i.y1,s=i.y2,l=t.x1,a=t.x2,h=t.y1,d=t.y2;return e&&(n>o&&([n,o]=[o,n]),r>s&&([r,s]=[s,r]),l>a&&([l,a]=[a,l]),h>d&&([h,d]=[d,h])),{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}};function d2(i,t,e){if(!i||!t)return Ls.NONE;const{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}=Hf(i,t,e);return n>l&&o<a&&r>h&&s<d?Ls.BBOX1:l>n&&a<o&&h>r&&d<s?Ls.BBOX2:Ls.NONE}function Ef(i,t,e){if(i&&t){if(!e)return!(i.x1>t.x2||i.x2<t.x1||i.y1>t.y2||i.y2<t.y1);const{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}=Hf(i,t,!0);return!(n>a||o<l||r>d||s<h)}return!0}function kf(i,t){return Math.abs(t[0]*i[0]+t[1]*i[1])}function Fs({x:i,y:t},e,n={x:0,y:0}){return{x:(i-n.x)*Math.cos(e)-(t-n.y)*Math.sin(e)+n.x,y:(i-n.x)*Math.sin(e)+(t-n.y)*Math.cos(e)+n.y}}function Lf(i){return{x:(i.x1+i.x2)/2,y:(i.y1+i.y2)/2}}function kC(i,t){const e=t?wn(i.angle):i.angle,n=Lf(i);return[Fs({x:i.x1,y:i.y1},e,n),Fs({x:i.x2,y:i.y1},e,n),Fs({x:i.x2,y:i.y2},e,n),Fs({x:i.x1,y:i.y2},e,n)]}function LC(i,t,e=!1,n){const o=kC(i,e),r=kC(t,e),s=(S,_)=>[_.x-S.x,_.y-S.y];n&&(n.save(),n.fillStyle="red",n.globalAlpha=.6,o.forEach((S,_)=>{_===0?n.moveTo(S.x,S.y):n.lineTo(S.x,S.y)}),n.fill(),n.restore(),n.save(),n.fillStyle="green",n.globalAlpha=.6,r.forEach((S,_)=>{_===0?n.moveTo(S.x,S.y):n.lineTo(S.x,S.y)}),n.fill(),n.restore());const l=Lf(i),a=Lf(t);n&&n.fillRect(l.x,l.y,2,2),n&&n.fillRect(a.x,a.y,2,2);const h=s(l,a),d=s(o[0],o[1]),u=s(o[1],o[2]),c=s(r[0],r[1]),g=s(r[1],r[2]),f=e?wn(i.angle):i.angle;let p=e?wn(90-i.angle):i.angle+_n;const m=e?wn(t.angle):t.angle;let v=e?wn(90-t.angle):t.angle+_n;p>le&&(p-=le),v>le&&(v-=le);const C=(S,_,y,w)=>{const A=[Math.cos(_),Math.sin(_)];return S+(kf(A,y)+kf(A,w))/2>kf(A,h)};return C((i.x2-i.x1)/2,f,c,g)&&C((i.y2-i.y1)/2,p,c,g)&&C((t.x2-t.x1)/2,m,d,u)&&C((t.y2-t.y1)/2,v,d,u)}const FC=i=>{let t=i.charCodeAt(0),e=i.length===2?i.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=e&&e<=57343&&(t&=1023,e&=1023,n=t<<10|e,n+=65536),n===12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n===8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n===172||n===175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n===161||n===164||167<=n&&n<=168||n===170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n===198||n===208||215<=n&&n<=216||222<=n&&n<=225||n===230||232<=n&&n<=234||236<=n&&n<=237||n===240||242<=n&&n<=243||247<=n&&n<=250||n===252||n===254||n===257||n===273||n===275||n===283||294<=n&&n<=295||n===299||305<=n&&n<=307||n===312||319<=n&&n<=322||n===324||328<=n&&n<=331||n===333||338<=n&&n<=339||358<=n&&n<=359||n===363||n===462||n===464||n===466||n===468||n===470||n===472||n===474||n===476||n===593||n===609||n===708||n===711||713<=n&&n<=715||n===717||n===720||728<=n&&n<=731||n===733||n===735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n===1025||1040<=n&&n<=1103||n===1105||n===8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n===8240||8242<=n&&n<=8243||n===8245||n===8251||n===8254||n===8308||n===8319||8321<=n&&n<=8324||n===8364||n===8451||n===8453||n===8457||n===8467||n===8470||8481<=n&&n<=8482||n===8486||n===8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n===8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n===8658||n===8660||n===8679||n===8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n===8715||n===8719||n===8721||n===8725||n===8730||8733<=n&&n<=8736||n===8739||n===8741||8743<=n&&n<=8748||n===8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n===8776||n===8780||n===8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n===8853||n===8857||n===8869||n===8895||n===8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n===9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n===9711||9733<=n&&n<=9734||n===9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n===9756||n===9758||n===9792||n===9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n===9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n===9955||9960<=n&&n<=9983||n===10045||n===10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n===65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"};function rd(i,t={},e){e||(e=1);const{fontStyle:n=t.fontStyle,fontVariant:o=t.fontVariant,fontWeight:r=t.fontWeight,fontSize:s=t.fontSize,fontFamily:l=t.fontFamily}=i;return(n?n+" ":"")+(o?o+" ":"")+(r?r+" ":"")+s*e+"px "+(l||"sans-serif")}class gi{constructor(t,e){this._numberCharSize=null,this._fullCharSize=null,this._letterCharSize=null,this._specialCharSizeMap={},this._canvas=null,this._context=null,this._contextSaved=!1,this._notSupportCanvas=!1,this._notSupportVRender=!1,this._userSpec={},this.specialCharSet=`-/: .,@%'"~`,this._option=t,this._userSpec=e??{},this.textSpec=this._initSpec(),z(t.specialCharSet)&&(this.specialCharSet=t.specialCharSet),this._standardMethod=z(t.getTextBounds)?this.fullMeasure.bind(this):this.measureWithNaiveCanvas.bind(this)}initContext(){if(this._notSupportCanvas)return!1;if(Tt(this._canvas)&&(z(this._option.getCanvasForMeasure)&&(this._canvas=this._option.getCanvasForMeasure()),Tt(this._canvas)&&typeof window<"u"&&window.document!==void 0&&globalThis&&z(globalThis.document)&&(this._canvas=globalThis.document.createElement("canvas"))),Tt(this._context)&&z(this._canvas)){const t=this._canvas.getContext("2d");z(t)&&(t.save(),t.font=rd(this.textSpec),this._contextSaved=!0,this._context=t)}return!Tt(this._context)||(this._notSupportCanvas=!0,!1)}_initSpec(){var t,e,n;const{defaultFontParams:o={}}=this._option,{fontStyle:r=o.fontStyle,fontVariant:s=o.fontVariant,fontWeight:l=(t=o.fontWeight)!==null&&t!==void 0?t:"normal",fontSize:a=(e=o.fontSize)!==null&&e!==void 0?e:12,fontFamily:h=(n=o.fontFamily)!==null&&n!==void 0?n:"sans-serif",align:d,textAlign:u=d??"center",baseline:c,textBaseline:g=c??"middle",ellipsis:f,limit:p}=this._userSpec;let{lineHeight:m=a}=this._userSpec;if(re(m)&&m[m.length-1]==="%"){const v=Number.parseFloat(m.substring(0,m.length-1))/100;m=a*v}return{fontStyle:r,fontVariant:s,fontFamily:h,fontSize:a,fontWeight:l,textAlign:u,textBaseline:g,ellipsis:f,limit:p,lineHeight:m}}measure(t,e){switch(e){case"vrender":case"canopus":return this.fullMeasure(t);case"canvas":return this.measureWithNaiveCanvas(t);case"simple":return this.quickMeasureWithoutCanvas(t);default:return this.quickMeasure(t)}}fullMeasure(t){if(Tt(t))return{width:0,height:0};if(Tt(this._option.getTextBounds)||!this._notSupportVRender)return this.measureWithNaiveCanvas(t);const{fontFamily:e,fontSize:n,fontWeight:o,textAlign:r,textBaseline:s,ellipsis:l,limit:a,lineHeight:h}=this.textSpec;let d;try{const u=this._option.getTextBounds({text:t,fontFamily:e,fontSize:n,fontWeight:o,textAlign:r,textBaseline:s,ellipsis:!!l,maxLineWidth:a||1/0,lineHeight:h});d={width:u.width(),height:u.height()}}catch{this._notSupportVRender=!0,d=this.measureWithNaiveCanvas(t)}return d}measureWithNaiveCanvas(t){return this._measureReduce(t,this._measureWithNaiveCanvas.bind(this))}_measureWithNaiveCanvas(t){var e;if(!this.initContext())return this._quickMeasureWithoutCanvas(t);const n=this._context.measureText(t),{fontSize:o,lineHeight:r}=this.textSpec;return{width:n.width,height:(e=r)!==null&&e!==void 0?e:o}}quickMeasure(t){return this._measureReduce(t,this._quickMeasure.bind(this))}_quickMeasure(t){const e={width:0,height:0};for(let n=0;n<t.length;n++){const o=t[n];let r=this._measureSpecialChar(o);Tt(r)&&gi.NUMBERS_CHAR_SET.includes(o)&&(r=this._measureNumberChar()),Tt(r)&&["F","W"].includes(FC(o))&&(r=this._measureFullSizeChar()),Tt(r)&&(r=this._measureLetterChar()),e.width+=r.width,e.height=Math.max(e.height,r.height)}return e}quickMeasureWithoutCanvas(t){return this._measureReduce(t,this._quickMeasureWithoutCanvas.bind(this))}_quickMeasureWithoutCanvas(t){var e;const n={width:0,height:0},{fontSize:o,lineHeight:r}=this.textSpec;for(let s=0;s<t.length;s++){const l=t[s],a=["F","W"].includes(FC(l))?1:.53;n.width+=a*o}return n.height=(e=r)!==null&&e!==void 0?e:o,n}_measureReduce(t,e){var n;const{fontSize:o,lineHeight:r}=this.textSpec,s={width:0,height:0};if(Tt(t))return s;if(it(t)){const l=t.filter(z).map(a=>a.toString());return l.length===0?s:l.length===1?e(l[0]):{width:l.reduce((a,h)=>Math.max(a,e(h).width),0),height:l.length*(((n=r)!==null&&n!==void 0?n:o)+1)+1}}return e(t.toString())}_measureNumberChar(){if(Tt(this._numberCharSize)){const t=this._standardMethod(gi.NUMBERS_CHAR_SET);this._numberCharSize={width:t.width/gi.NUMBERS_CHAR_SET.length,height:t.height}}return this._numberCharSize}_measureFullSizeChar(){return Tt(this._fullCharSize)&&(this._fullCharSize=this._standardMethod(gi.FULL_SIZE_CHAR)),this._fullCharSize}_measureLetterChar(){if(Tt(this._letterCharSize)){const t=this._standardMethod(gi.ALPHABET_CHAR_SET);this._letterCharSize={width:t.width/gi.ALPHABET_CHAR_SET.length,height:t.height}}return this._letterCharSize}_measureSpecialChar(t){return z(this._specialCharSizeMap[t])?this._specialCharSizeMap[t]:this.specialCharSet.includes(t)?(this._specialCharSizeMap[t]=this._standardMethod(t),this._specialCharSizeMap[t]):null}release(){z(this._canvas)&&(this._canvas=null),z(this._context)&&(this._contextSaved&&(this._context.restore(),this._contextSaved=!1),this._context=null)}}gi.ALPHABET_CHAR_SET="abcdefghijklmnopqrstuvwxyz",gi.NUMBERS_CHAR_SET="0123456789",gi.FULL_SIZE_CHAR="字";function Ff(i,t,e){const{x1:n,y1:o,x2:r,y2:s}=t;return e.onlyTranslate()?(i!==t&&i.setValue(t.x1,t.y1,t.x2,t.y2),i.translate(e.e,e.f),t):(i.clear(),i.add(e.a*n+e.c*o+e.e,e.b*n+e.d*o+e.f),i.add(e.a*r+e.c*o+e.e,e.b*r+e.d*o+e.f),i.add(e.a*r+e.c*s+e.e,e.b*r+e.d*s+e.f),i.add(e.a*n+e.c*s+e.e,e.b*n+e.d*s+e.f),t)}class sn{constructor(t){t?this.setValue(t.x1,t.y1,t.x2,t.y2):this.clear()}clone(){return new sn(this)}clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this}empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE}equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2}setValue(t=0,e=0,n=0,o=0){return this.x1=t,this.y1=e,this.x2=n,this.y2=o,this}set(t=0,e=0,n=0,o=0){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),o<e?(this.y2=e,this.y1=o):(this.y1=e,this.y2=o),this}add(t=0,e=0){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this}expand(t=0){return it(t)?(this.y1-=t[0],this.x2+=t[1],this.y2+=t[2],this.x1-=t[3]):(this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t),this}round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this}translate(t=0,e=0){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this}rotate(t=0,e=0,n=0){const o=this.rotatedPoints(t,e,n);return this.clear().add(o[0],o[1]).add(o[2],o[3]).add(o[4],o[5]).add(o[6],o[7])}scale(t=0,e=0,n=0,o=0){const r=this.scalePoints(t,e,n,o);return this.clear().add(r[0],r[1]).add(r[2],r[3])}union(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this}intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this}encloses(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2}alignsWith(t){return t&&(this.x1===t.x1||this.x2===t.x2||this.y1===t.y1||this.y2===t.y2)}intersects(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)}contains(t=0,e=0){return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)}containsPoint(t){return!(t.x<this.x1||t.x>this.x2||t.y<this.y1||t.y>this.y2)}width(){return this.empty()?0:this.x2-this.x1}height(){return this.empty()?0:this.y2-this.y1}scaleX(t=0){return this.x1*=t,this.x2*=t,this}scaleY(t=0){return this.y1*=t,this.y2*=t,this}transformWithMatrix(t){return Ff(this,this,t),this}copy(t){return this.x1=t.x1,this.y1=t.y1,this.x2=t.x2,this.y2=t.y2,this}rotatedPoints(t,e,n){const{x1:o,y1:r,x2:s,y2:l}=this,a=Math.cos(t),h=Math.sin(t),d=e-e*a+n*h,u=n-e*h-n*a;return[a*o-h*r+d,h*o+a*r+u,a*o-h*l+d,h*o+a*l+u,a*s-h*r+d,h*s+a*r+u,a*s-h*l+d,h*s+a*l+u]}scalePoints(t,e,n,o){const{x1:r,y1:s,x2:l,y2:a}=this;return[t*r+(1-t)*n,e*s+(1-e)*o,t*l+(1-t)*n,e*a+(1-e)*o]}}class Ee extends sn{}class u2 extends sn{constructor(t,e=0){super(t),t&&(this.angle=e)}intersects(t){return LC(this,t)}setValue(t=0,e=0,n=0,o=0,r=0){return super.setValue(t,e,n,o),this.angle=r,this}}class ni{constructor(t=1,e=0,n=0,o=1,r=0,s=0){this.a=t,this.b=e,this.c=n,this.d=o,this.e=r,this.f=s}equalToMatrix(t){return!(this.e!==t.e||this.f!==t.f||this.a!==t.a||this.d!==t.d||this.b!==t.b||this.c!==t.c)}equalTo(t,e,n,o,r,s){return!(this.e!==r||this.f!==s||this.a!==t||this.d!==o||this.b!==e||this.c!==n)}setValue(t,e,n,o,r,s){return this.a=t,this.b=e,this.c=n,this.d=o,this.e=r,this.f=s,this}reset(){return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this}getInverse(){const t=this.a,e=this.b,n=this.c,o=this.d,r=this.e,s=this.f,l=new ni,a=t*o-e*n;return l.a=o/a,l.b=-e/a,l.c=-n/a,l.d=t/a,l.e=(n*s-o*r)/a,l.f=-(t*s-e*r)/a,l}rotate(t){const e=Math.cos(t),n=Math.sin(t),o=this.a*e+this.c*n,r=this.b*e+this.d*n,s=this.a*-n+this.c*e,l=this.b*-n+this.d*e;return this.a=o,this.b=r,this.c=s,this.d=l,this}rotateByCenter(t,e,n){const o=Math.cos(t),r=Math.sin(t),s=(1-o)*e+r*n,l=(1-o)*n-r*e,a=o*this.a-r*this.b,h=r*this.a+o*this.b,d=o*this.c-r*this.d,u=r*this.c+o*this.d,c=o*this.e-r*this.f+s,g=r*this.e+o*this.f+l;return this.a=a,this.b=h,this.c=d,this.d=u,this.e=c,this.f=g,this}scale(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this}setScale(t,e){return this.b=this.b/this.a*t,this.c=this.c/this.d*e,this.a=t,this.d=e,this}transform(t,e,n,o,r,s){return this.multiply(t,e,n,o,r,s),this}translate(t,e){return this.e+=this.a*t+this.c*e,this.f+=this.b*t+this.d*e,this}transpose(){const{a:t,b:e,c:n,d:o,e:r,f:s}=this;return this.a=e,this.b=t,this.c=o,this.d=n,this.e=s,this.f=r,this}multiply(t,e,n,o,r,s){const l=this.a,a=this.b,h=this.c,d=this.d,u=l*t+h*e,c=a*t+d*e,g=l*n+h*o,f=a*n+d*o,p=l*r+h*s+this.e,m=a*r+d*s+this.f;return this.a=u,this.b=c,this.c=g,this.d=f,this.e=p,this.f=m,this}interpolate(t,e){const n=new ni;return n.a=this.a+(t.a-this.a)*e,n.b=this.b+(t.b-this.b)*e,n.c=this.c+(t.c-this.c)*e,n.d=this.d+(t.d-this.d)*e,n.e=this.e+(t.e-this.e)*e,n.f=this.f+(t.f-this.f)*e,n}transformPoint(t,e){const{a:n,b:o,c:r,d:s,e:l,f:a}=this,h=n*s-o*r,d=s/h,u=-o/h,c=-r/h,g=n/h,f=(r*a-s*l)/h,p=-(n*a-o*l)/h,{x:m,y:v}=t;e.x=m*d+v*c+f,e.y=m*u+v*g+p}onlyTranslate(t=1){return this.a===t&&this.b===0&&this.c===0&&this.d===t}clone(){return new ni(this.a,this.b,this.c,this.d,this.e,this.f)}toTransformAttrs(){const t=this.a,e=this.b,n=this.c,o=this.d,r=t*o-e*n,s={x:this.e,y:this.f,rotateDeg:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!==0||e!==0){const l=Math.sqrt(t*t+e*e);s.rotateDeg=e>0?Math.acos(t/l):-Math.acos(t/l),s.scaleX=l,s.scaleY=r/l,s.skewX=(t*n+e*o)/r,s.skewY=0}else if(n!==0||o!==0){const l=Math.sqrt(n*n+o*o);s.rotateDeg=Math.PI/2-(o>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=r/l,s.scaleY=l,s.skewX=0,s.skewY=(t*n+e*o)/r}return s.rotateDeg=l2(s.rotateDeg),s}}function c2(i,t,e,n,o,r,s,l){const a=t.a,h=t.b,d=t.c,u=t.d,c=t.e,g=t.f,f=ii(s),p=We(s);let m,v;l?(m=l[0],v=l[1]):(m=e,v=n);const C=m-e,S=v-n,_=a*f+d*p,y=h*f+u*p,w=d*f-a*p,A=u*f-h*p;i.a=o*_,i.b=o*y,i.c=r*w,i.d=r*A,i.e=c+a*m+d*v-_*C-w*S,i.f=g+h*m+u*v-y*C-A*S}class g2{constructor(){this.CLEAN_THRESHOLD=1e3,this.L_TIME=1e3,this.R_COUNT=1,this.R_TIMESTAMP_MAX_SIZE=20}clearCache(t,e){const{CLEAN_THRESHOLD:n=this.CLEAN_THRESHOLD,L_TIME:o=this.L_TIME,R_COUNT:r=this.R_COUNT}=e;if(t.size<n)return 0;let s=0;const l=h=>{s++,t.delete(h)},a=Date.now();return t.forEach((h,d)=>{if(h.timestamp.length<r)return l(d);let u=0;for(;a-h.timestamp[h.timestamp.length-1-u]<o&&(u++,!(u>=r)););if(u<r)return l(d);for(;a-h.timestamp[0]>o;)h.timestamp.shift()}),s}addLimitedTimestamp(t,e,n){const{R_TIMESTAMP_MAX_SIZE:o=this.R_TIMESTAMP_MAX_SIZE}=n;t.timestamp.length>o&&t.timestamp.shift(),t.timestamp.push(e)}clearTimeStamp(t,e){const{L_TIME:n=this.L_TIME}=e,o=Date.now();t.forEach(r=>{for(;o-r.timestamp[0]>n;)r.timestamp.shift()})}clearItemTimestamp(t,e){const{L_TIME:n=this.L_TIME}=e,o=Date.now();for(;o-t.timestamp[0]>n;)t.timestamp.shift()}}function If(i,t,e){t/=100,e/=100;const n=(1-Math.abs(2*e-1))*t,o=n*(1-Math.abs(i/60%2-1)),r=e-n/2;let s=0,l=0,a=0;return 0<=i&&i<60?(s=n,l=o,a=0):60<=i&&i<120?(s=o,l=n,a=0):120<=i&&i<180?(s=0,l=n,a=o):180<=i&&i<240?(s=0,l=o,a=n):240<=i&&i<300?(s=o,l=0,a=n):300<=i&&i<360&&(s=n,l=0,a=o),s=Math.round(255*(s+r)),l=Math.round(255*(l+r)),a=Math.round(255*(a+r)),{r:s,g:l,b:a}}function Df(i,t,e){i/=255,t/=255,e/=255;const n=Math.min(i,t,e),o=Math.max(i,t,e),r=o-n;let s=0,l=0,a=0;return s=r===0?0:o===i?(t-e)/r%6:o===t?(e-i)/r+2:(i-t)/r+4,s=Math.round(60*s),s<0&&(s+=360),a=(o+n)/2,l=r===0?0:r/(1-Math.abs(2*a-1)),l=+(100*l).toFixed(1),a=+(100*a).toFixed(1),{h:s,s:l,l:a}}const f2=/^#([0-9a-f]{3,8})$/,IC={transparent:4294967040},sd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ld(i){return((i=Math.max(0,Math.min(255,Math.round(i)||0)))<16?"0":"")+i.toString(16)}function DC(i){return at(i)?new Oi(i>>16,i>>8&255,255&i,1):it(i)?new Oi(i[0],i[1],i[2]):new Oi(255,255,255)}function p2(i){return at(i)?new Oi(i>>>24,i>>>16&255,i>>>8&255,255&i):it(i)?new Oi(i[0],i[1],i[2],i[3]):new Oi(255,255,255,1)}function Of(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function zf(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}const OC=(i,t)=>{const e=f2.exec(i);if(t||e){const n=parseInt(e[1],16),o=e[1].length;return o===3?new Oi((n>>8&15)+((n>>8&15)<<4),(n>>4&15)+((n>>4&15)<<4),(15&n)+((15&n)<<4),1):o===6?DC(n):o===8?new Oi(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):null}};class ln{static Brighter(t,e=1){return e===1?t:new ln(t).brighter(e).toRGBA()}static SetOpacity(t,e=1){return e===1?t:new ln(t).setOpacity(e).toRGBA()}static getColorBrightness(t,e="hsl"){const n=t instanceof ln?t:new ln(t);switch(e){case"hsv":default:return n.getHSVBrightness();case"hsl":return n.getHSLBrightness();case"lum":return n.getLuminance();case"lum2":return n.getLuminance2();case"lum3":return n.getLuminance3()}}static parseColorString(t){if(z(IC[t]))return p2(IC[t]);if(z(sd[t]))return DC(sd[t]);const e=`${t}`.trim().toLowerCase(),n=OC(e);if(n!==void 0)return n;if(/^(rgb|RGB|rgba|RGBA)/.test(e)){const o=e.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new Oi(parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10),parseFloat(o[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(e)){const o=e.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),r=If(parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10));return new Oi(r.r,r.g,r.b,parseFloat(o[3]))}}constructor(t){const e=ln.parseColorString(t);e?this.color=e:(console.warn(`Warn: 传入${t}无法解析为Color`),this.color=new Oi(255,255,255))}toRGBA(){return this.color.formatRgb()}toString(){return this.color.formatRgb()}toHex(){return this.color.formatHex()}toHsl(){return this.color.formatHsl()}brighter(t){const{r:e,g:n,b:o}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(e*t))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t))),this.color.b=Math.max(0,Math.min(255,Math.floor(o*t))),this}add(t){const{r:e,g:n,b:o}=this.color;return this.color.r+=Math.min(255,e+t.color.r),this.color.g+=Math.min(255,n+t.color.g),this.color.b+=Math.min(255,o+t.color.b),this}sub(t){return this.color.r=Math.max(0,this.color.r-t.color.r),this.color.g=Math.max(0,this.color.g-t.color.g),this.color.b=Math.max(0,this.color.b-t.color.b),this}multiply(t){const{r:e,g:n,b:o}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(e*t.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(o*t.color.b))),this}getHSVBrightness(){return Math.max(this.color.r,this.color.g,this.color.b)/255}getHSLBrightness(){return .5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}setHsl(t,e,n){const o=this.color.opacity,r=Df(this.color.r,this.color.g,this.color.b),s=If(Tt(t)?r.h:rn(t,0,360),Tt(e)?r.s:e>=0&&e<=1?100*e:e,Tt(n)?r.l:n<=1&&n>=0?100*n:n);return this.color=new Oi(s.r,s.g,s.b,o),this}setRGB(t,e,n){return!Tt(t)&&(this.color.r=t),!Tt(e)&&(this.color.g=e),!Tt(n)&&(this.color.b=n),this}setHex(t){const e=`${t}`.trim().toLowerCase(),n=OC(e,!0);return n??this}setColorName(t){const e=sd[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}setScalar(t){return this.color.r=t,this.color.g=t,this.color.b=t,this}setOpacity(t=1){return this.color.opacity=t,this}getLuminance(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}getLuminance2(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}getLuminance3(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}clone(){return new ln(this.color.toString())}copyGammaToLinear(t,e=2){return this.color.r=Math.pow(t.color.r,e),this.color.g=Math.pow(t.color.g,e),this.color.b=Math.pow(t.color.b,e),this}copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.color.r=Math.pow(t.color.r,n),this.color.g=Math.pow(t.color.g,n),this.color.b=Math.pow(t.color.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.color.r=Of(t.color.r),this.color.g=Of(t.color.g),this.color.b=Of(t.color.b),this}copyLinearToSRGB(t){return this.color.r=zf(t.color.r),this.color.g=zf(t.color.g),this.color.b=zf(t.color.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}}class Oi{constructor(t,e,n,o){this.r=isNaN(+t)?255:Math.max(0,Math.min(255,+t)),this.g=isNaN(+e)?255:Math.max(0,Math.min(255,+e)),this.b=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),z(o)?this.opacity=isNaN(+o)?1:Math.max(0,Math.min(1,+o)):this.opacity=1}formatHex(){return`#${ld(this.r)+ld(this.g)+ld(this.b)+(this.opacity===1?"":ld(255*this.opacity))}`}formatRgb(){const t=this.opacity;return`${t===1?"rgb(":"rgba("}${this.r},${this.g},${this.b}${t===1?")":`,${t})`}`}formatHsl(){const t=this.opacity,{h:e,s:n,l:o}=Df(this.r,this.g,this.b);return`${t===1?"hsl(":"hsla("}${e},${n}%,${o}%${t===1?")":`,${t})`}`}toString(){return this.formatHex()}}function m2(i){let t="",e="",n="";const o=i[0]==="#"?1:0;for(let r=o;r<i.length;r++)i[r]!=="#"&&(r<o+2?t+=i[r]:r<o+4?e+=i[r]:r<o+6&&(n+=i[r]));return[parseInt(t,16),parseInt(e,16),parseInt(n,16)]}function v2(i,t,e){return Number((1<<24)+(i<<16)+(t<<8)+e).toString(16).slice(1)}function b2(i,t){const e=i.r,n=t.r,o=i.g,r=t.g,s=i.b,l=t.b,a=i.opacity,h=t.opacity;return d=>{const u=Math.round(e*(1-d)+n*d),c=Math.round(o*(1-d)+r*d),g=Math.round(s*(1-d)+l*d);return new Oi(u,c,g,a*(1-d)+h*d)}}const C2=Object.freeze(Object.defineProperty({__proto__:null,Color:ln,DEFAULT_COLORS:sd,RGB:Oi,hexToRgb:m2,hslToRgb:If,interpolateRgb:b2,rgbToHex:v2,rgbToHsl:Df},Symbol.toStringTag,{value:"Module"}));function lo(i){if(Se(i))return[i,i,i,i];if(it(i)){const t=i.length;if(t===1){const e=i[0];return[e,e,e,e]}if(t===2){const[e,n]=i;return[e,n,e,n]}if(t===3){const[e,n,o]=i;return[e,n,o,n]}if(t===4)return i}if(se(i)){const{top:t=0,right:e=0,bottom:n=0,left:o=0}=i;return[t,e,n,o]}return[0,0,0,0]}function y2(i){try{return i instanceof Element}catch{const e=["children","innerHTML","classList","setAttribute","tagName","getBoundingClientRect"],n=Object.keys(i);return e.every(o=>n.includes(o))}}const _2=_i-1e-8;class Wf{constructor(t){this.init(t)}init(t){this.bounds=t}arc(t,e,n,o,r,s){if(Math.abs(r-o)>_2)return this.bounds.add(t-n,e-n),void this.bounds.add(t+n,e+n);let l,a,h,d,u=1/0,c=-1/0,g=1/0,f=-1/0;function p(m){h=n*Math.cos(m),d=n*Math.sin(m),h<u&&(u=h),h>c&&(c=h),d<g&&(g=d),d>f&&(f=d)}if(p(o),p(r),r!==o)if((o%=_i)<0&&(o+=_i),(r%=_i)<0&&(r+=_i),r<o&&(s=!s,l=o,o=r,r=l),s)for(r-=_i,l=o-o%_n,a=0;a<4&&l>r;++a,l-=_n)p(l);else for(l=o-o%_n+_n,a=0;a<4&&l<r;++a,l+=_n)p(l);this.bounds.add(t+u,e+g),this.bounds.add(t+c,e+f)}arcTo(t,e,n,o,r){this.bounds.add(t,e)}bezierCurveTo(t,e,n,o,r,s){this.bounds.add(t,e),this.bounds.add(n,o),this.bounds.add(r,s)}closePath(){}ellipse(){throw new Error("不支持ellipse")}lineTo(t,e){this.bounds.add(t,e)}moveTo(t,e){this.bounds.add(t,e)}quadraticCurveTo(t,e,n,o){this.bounds.add(t,e),this.bounds.add(n,o)}rect(t,e,n,o){this.bounds.add(t,e),this.bounds.add(t+n,e+o)}clear(){this.bounds.clear()}release(...t){}}class w2{constructor(){this.curves=[],this.bounds=new Ee}getCurveLengths(){return this.curves.map(t=>t.getLength())}getPointAt(t){return{x:0,y:0}}getLength(){return 0}getBounds(){return this.bounds}}const S2=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,x2={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},pe={A:0,AT:1,C:2,Z:3,E:4,L:5,M:6,Q:7,R:8};let Nf,zC,ad,WC,Vf,hd;function R2(i){if(!i)return[];const t=i.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(t===null)return[];let e,n;const o=[];for(let r=0,s=t.length;r<s;r++)if(Nf=t[r],zC=Nf.slice(1),ad=Nf[0],e=[ad],n=zC.match(S2),n!==null){for(let l=0,a=n.length;l<a;l++)WC=n[l],Vf=parseFloat(WC),Number.isNaN(Vf)||e.push(Vf);if(hd=x2[ad],e.length-1>hd){let l,a=ad;for(let h=1,d=e.length;h<d;h+=hd){l=[a];for(let u=h,c=h+hd;u<c;u++)l.push(e[u]);o.push(l),a==="m"?a="l":a==="M"&&(a="L")}}else o.push(e)}else o.push(e);return o}var Ce;(function(i){i[i.NONE=0]="NONE",i[i.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",i[i.UPDATE_SHAPE=2]="UPDATE_SHAPE",i[i.CLEAR_SHAPE=253]="CLEAR_SHAPE",i[i.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",i[i.INIT=179]="INIT",i[i.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",i[i.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",i[i.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",i[i.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",i[i.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",i[i.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",i[i.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",i[i.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"})(Ce||(Ce={}));var Jl;(function(i){i[i.GLOBAL=1]="GLOBAL",i[i.LOCAL=16]="LOCAL",i[i.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",i[i.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"})(Jl||(Jl={}));var Yi;(function(i){i[i.INIT=0]="INIT",i[i.DEFAULT=1]="DEFAULT",i[i.STATE=2]="STATE",i[i.ANIMATE_BIND=10]="ANIMATE_BIND",i[i.ANIMATE_PLAY=11]="ANIMATE_PLAY",i[i.ANIMATE_START=12]="ANIMATE_START",i[i.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",i[i.ANIMATE_END=14]="ANIMATE_END",i[i.TRANSLATE=20]="TRANSLATE",i[i.TRANSLATE_TO=21]="TRANSLATE_TO",i[i.SCALE=22]="SCALE",i[i.SCALE_TO=23]="SCALE_TO",i[i.ROTATE=24]="ROTATE",i[i.ROTATE_TO=25]="ROTATE_TO"})(Yi||(Yi={}));var Pi;(function(i){i[i.INITIAL=0]="INITIAL",i[i.RUNNING=1]="RUNNING",i[i.PAUSED=2]="PAUSED",i[i.END=3]="END"})(Pi||(Pi={}));var dd;(function(i){i[i.NORMAL=0]="NORMAL",i[i.SET_ATTR_IMMEDIATELY=1]="SET_ATTR_IMMEDIATELY"})(dd||(dd={}));var Is;(function(i){i.wait="wait",i.from="from",i.to="to",i.customAnimate="customAnimate"})(Is||(Is={}));var Te;(function(i){i[i.ROW=1]="ROW",i[i.COLUMN=2]="COLUMN"})(Te||(Te={}));var ud;(function(i){i[i.CubicBezierCurve=0]="CubicBezierCurve",i[i.QuadraticBezierCurve=1]="QuadraticBezierCurve",i[i.ArcCurve=2]="ArcCurve",i[i.LineCurve=3]="LineCurve",i[i.EllipseCurve=4]="EllipseCurve",i[i.MoveCurve=5]="MoveCurve"})(ud||(ud={}));var ae;(function(i){i[i.beforeFillStroke=0]="beforeFillStroke",i[i.afterFillStroke=1]="afterFillStroke"})(ae||(ae={}));function A2(i,t,e,n,o,r,s,l,a){const h=wn(s),d=Math.sin(h),u=Math.cos(h),c=u*(l-i)*.5+d*(a-t)*.5,g=u*(a-t)*.5-d*(l-i)*.5;let f=c*c/((e=Math.abs(e))*e)+g*g/((n=Math.abs(n))*n);f>1&&(f=Math.sqrt(f),e*=f,n*=f);const p=u/e,m=d/e,v=-d/n,C=u/n,S=p*l+m*a,_=v*l+C*a,y=p*i+m*t,w=v*i+C*t;let A=1/((y-S)*(y-S)+(w-_)*(w-_))-.25;A<0&&(A=0);let R=Math.sqrt(A);r===o&&(R=-R);const x=.5*(S+y)-R*(w-_),M=.5*(_+w)+R*(y-S),T=Math.atan2(_-M,S-x);let B=Math.atan2(w-M,y-x)-T;B<0&&r===1?B+=_i:B>0&&r===0&&(B-=_i);const H=Math.ceil(Math.abs(B/(_n+.001))),k=[];for(let P=0;P<H;++P){const E=T+P*B/H,F=T+(P+1)*B/H;k[P]=[x,M,E,F,e,n,d,u]}return k}function T2(i){const t=i[0],e=i[1],n=i[2],o=i[3],r=i[4],s=i[5],l=i[6],a=i[7],h=a*r,d=-l*s,u=l*r,c=a*s,g=Math.cos(n),f=Math.sin(n),p=Math.cos(o),m=Math.sin(o),v=.5*(o-n),C=Math.sin(.5*v),S=8/3*C*C/Math.sin(v),_=t+g-S*f,y=e+f+S*g,w=t+p,A=e+m,R=w+S*m,x=A-S*p;return[h*_+d*y,u*_+c*y,h*R+d*x,u*R+c*x,h*w+d*A,u*w+c*A]}function NC(i,t,e,n){const o=A2(n[5],n[6],n[0],n[1],n[3],n[4],n[2],t,e);for(let r=0;r<o.length;++r){const s=T2(o[r]);i.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}}const M2=(i,t,e,n,o,r,s)=>{const l=Math.abs(e-t),a=l>.5*Math.PI?Math.ceil(2*l/Math.PI):1,h=(e-t)/a;for(let d=0;d<a;d++){const u=t+h*d,c=t+h*(d+1),g=4*Math.tan(Math.abs(h)/4)/3,f=c<u?-1:1,p=Math.cos(u),m=Math.sin(u),v=Math.cos(c),C=Math.sin(c),S=p*r+n,_=m*s+o,y=v*r+n,w=C*s+o,A=r*g*f,R=s*g*f;i.push(S-A*m,_+R*p,y+A*C,w-R*v,y,w)}},B2=[(i,t,e,n,o,r,s)=>t.arc(i[1]*o+e,i[2]*r+n,i[3]*(o+r)/2,i[4],i[5],i[6],s),(i,t,e,n,o,r,s)=>t.arcTo(i[1]*o+e,i[2]*r+n,i[3]*o+e,i[4]*r+n,i[5]*(o+r)/2,s),(i,t,e,n,o,r,s)=>t.bezierCurveTo(i[1]*o+e,i[2]*r+n,i[3]*o+e,i[4]*r+n,i[5]*o+e,i[6]*r+n,s),(i,t,e,n)=>t.closePath(),(i,t,e,n,o,r)=>t.ellipse(i[1]*o+e,i[2]*r+n,i[3]*o,i[4]*r,i[5],i[6],i[7],i[8]),(i,t,e,n,o,r,s)=>t.lineTo(i[1]*o+e,i[2]*r+n,s),(i,t,e,n,o,r,s)=>t.moveTo(i[1]*o+e,i[2]*r+n,s),(i,t,e,n,o,r,s)=>t.quadraticCurveTo(i[1]*o+e,i[2]*r+n,i[3]*o+e,i[4]*r+n,s),(i,t,e,n,o,r,s)=>t.rect(i[1]*o+e,i[2]*r+n,i[3]*o,i[4]*r,s)];function lr(i,t,e=0,n=0,o=1,r=1,s){for(let l=0;l<i.length;l++){const a=i[l];B2[a[0]](a,t,e,n,o,r,s)}}class VC{getLength(t){return t!=null?this.calcProjLength(t):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}function P2(i,t){let e=0;const n=i.length;for(let o=0;o<n;o++){const r=i[o],s=t[o],l=i[(o+1)%n],a=t[(o+1)%n];e+=Mo.distanceNN(r,s,l,a)}return e/2}function H2(i,t,e,n,o){return P2([i.x,t.x,e.x,n.x],[i.y,t.y,e.y,n.y])}function jC(i,t,e,n,o){const r=1-o;return r*r*r*i+3*t*o*r*r+3*e*o*o*r+n*o*o*o}function $C(i,t,e,n,o){const r=jC(i.x,t.x,e.x,n.x,o),s=jC(i.y,t.y,e.y,n.y,o);return new Ye(r,s)}function jf(i,t){const{p0:e,p1:n,p2:o,p3:r}=i,s=$C(e,n,o,r,t),l=Mo.pointAtPP(e,n,t),a=Mo.pointAtPP(n,o,t),h=Mo.pointAtPP(o,r,t),d=Mo.pointAtPP(l,a,t),u=Mo.pointAtPP(a,h,t);return[new $f(e,l,d,s),new $f(s,u,h,r)]}class $f extends VC{constructor(t,e,n,o){super(),this.type=ud.CubicBezierCurve,this.p0=t,this.p1=e,this.p2=n,this.p3=o}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}getPointAt(t){if(this.defined!==!1)return $C(this.p0,this.p1,this.p2,this.p3,t);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?H2(this.p0,this.p1,this.p2,this.p3):60}calcProjLength(t){return t===Te.ROW?ve(this.p0.x-this.p3.x):t===Te.COLUMN?ve(this.p0.y-this.p3.y):0}getAngleAt(t){const e=sr(t-.01,0),n=Bi(t+.01,1),o=this.getPointAt(e),r=this.getPointAt(n);return fe(r.y-o.y,r.x-o.x)}}function GC(i,t){const{p0:e,p1:n}=i,o=Mo.pointAtPP(e,n,t);return[new Gf(e,o),new Gf(o,n)]}class Gf extends VC{constructor(t,e){super(),this.type=ud.LineCurve,this.p0=t,this.p1=e}getPointAt(t){if(this.defined!==!1)return Mo.pointAtPP(this.p0,this.p1,t);throw new Error("defined为false的点不能getPointAt")}getAngleAt(t){return this.angle==null&&(this.angle=fe(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}calcLength(){return this._validPoint()?Mo.distancePP(this.p0,this.p1):60}calcProjLength(t){return t===Te.ROW?ve(this.p0.x-this.p1.x):t===Te.COLUMN?ve(this.p0.y-this.p1.y):0}}class Uf{get endX(){return this._lastX}get endY(){return this._lastY}constructor(t,e){this.init(t,e)}init(t,e){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=t,this.direction=e,this.curves=[]}bezierCurveTo(t,e,n,o,r,s,l,a){const h=new $f(new Ye(this._lastX,this._lastY),new Ye(t,e),new Ye(n,o),new Ye(r,s));h.originP1=this._lastOriginP,h.originP2=a,h.defined=l,this.curves.push(h),this._lastX=r,this._lastY=s,this._lastOriginP=a}closePath(){if(this.curves.length<2)return;const t=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,t.defined,this._startOriginP)}ellipse(){throw new Error("SegContext不支持调用ellipse")}lineTo(t,e,n,o){const r=this.addLinearCurve(t,e,n,this._lastOriginP,o);this.curves.push(r),this._lastX=t,this._lastY=e,this._lastOriginP=o}moveTo(t,e,n){return this._lastX=this._startX=t,this._lastY=this._startY=e,this._lastOriginP=n,this._startOriginP=n,this}quadraticCurveTo(t,e,n,o){throw new Error("SegContext不支持调用quadraticCurveTo")}clear(){this.curves=[],this.length=NaN}tryUpdateLength(t){return this.getLength(t)}addLinearCurve(t,e,n,o,r){const s=new Gf(new Ye(this._lastX,this._lastY),new Ye(t,e));return s.originP1=o,s.originP2=r,s.defined=n,s}getPointAt(t){throw new Error("暂未实现")}getCurveLengths(){return[]}getLength(t){var e,n;if(t===Te.COLUMN){if(!this.curves.length)return 0;const o=this.curves[0],r=this.curves[this.curves.length-1],s=(e=r.p3)!==null&&e!==void 0?e:r.p1;return ve(o.p0.y-s.y)}if(t===Te.ROW){if(!this.curves.length)return 0;const o=this.curves[0],r=this.curves[this.curves.length-1],s=(n=r.p3)!==null&&n!==void 0?n:r.p1;return ve(o.p0.x-s.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce((o,r)=>o+r.getLength(),0)),this.length}}class E2 extends Uf{bezierCurveTo(t,e,n,o,r,s,l,a){return super.bezierCurveTo(e,t,o,n,s,r,l,a)}lineTo(t,e,n,o){return super.lineTo(e,t,n,o)}moveTo(t,e,n){return super.moveTo(e,t,n)}clear(){return super.clear()}}function Nr(i,t,e=1){let n=!1;for(let o=0,r=t.length;o<=r;o++)o>=r===n&&((n=!n)?i.lineStart():i.lineEnd()),n&&i.point(t[o])}function Ds(i,t,e){const n=t??(ve(e[e.length-1].x-e[0].x)>ve(e[e.length-1].y-e[0].y)?Te.ROW:Te.COLUMN);return i==="monotoneY"?new E2(i,n):new Uf(i,n)}class UC{constructor(t,e){this.context=t,e&&(this.startPoint=e)}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;default:this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t)}this._lastDefined=t.defined}tryUpdateLength(){return this.context.tryUpdateLength()}}function Ql(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;const o=Ds("linear",e,i);return k2(new UC(o,n),i),o}function k2(i,t){return Nr(i,t,1)}function KC(i,t,e,n,o){i.context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+t)/6,(i._y0+4*i._y1+e)/6,n,i.lastPoint1)}class L2{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){this._point===2&&KC(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1),(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;break;default:KC(this,e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function F2(i,t){return Nr(i,t,2)}function I2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;if(i.length<3-+!!n)return Ql(i,t);const o=Ds("basis",e,i);return F2(new L2(o,n),i),o}function YC(i){return i<0?-1:1}function XC(i,t,e){const n=i._x1-i._x0,o=t-i._x1,r=(i._y1-i._y0)/(n||Number(o<0&&-0)),s=(e-i._y1)/(o||Number(n<0&&-0)),l=(r*o+s*n)/(n+o);return(YC(r)+YC(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(l))||0}function qC(i,t){const e=i._x1-i._x0;return e?(3*(i._y1-i._y0)/e-t)/2:t}function Kf(i,t,e,n,o){const r=i._x0,s=i._y0,l=i._x1,a=i._y1,h=(l-r)/3;i.context.bezierCurveTo(r+h,s+h*t,l-h,a-h*e,l,a,n,i.lastPoint1)}class ZC{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1);break;case 3:Kf(this,this._t0,qC(this,this._t0),this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1)}(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){let e=NaN;const n=t.x,o=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(n,o,this._lastDefined1!==!1&&this._lastDefined2!==!1,t):this.context.moveTo(n,o,t);break;case 1:this._point=2;break;case 2:this._point=3,Kf(this,qC(this,e=XC(this,n,o)),e,this._lastDefined1!==!1&&this._lastDefined2!==!1);break;default:Kf(this,this._t0,e=XC(this,n,o),this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=o,this._t0=e,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined!==!1,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}class D2 extends ZC{constructor(t,e){super(t,e)}point(t){return super.point({y:t.x,x:t.y,defined:t.defined})}}function O2(i,t){return Nr(i,t,2)}function z2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;if(i.length<3-+!!n)return Ql(i,t);const o=Ds("monotoneX",e,i);return O2(new ZC(o,n),i),o}function W2(i,t){return Nr(i,t,2)}function N2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;if(i.length<3-+!!n)return Ql(i,t);const o=Ds("monotoneY",e,i);return W2(new D2(o,n),i),o}let V2=class{constructor(t,e=.5,n){this.context=t,this._t=e,this.startPoint=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){0<this._t&&this._t<1&&this._point===2&&this.context.lineTo(this._x,this._y,this._lastDefined!==!1,this.lastPoint),(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,n,this._lastDefined!==!1&&t.defined!==!1,this.lastPoint),this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t);else{const o=this._x*(1-this._t)+e*this._t;this.context.lineTo(o,this._y,this._lastDefined!==!1&&t.defined!==!1,this.lastPoint),this.context.lineTo(o,n,this._lastDefined!==!1&&t.defined!==!1,t)}}this._lastDefined=t.defined,this._x=e,this._y=n,this.lastPoint=t}tryUpdateLength(){return this.context.tryUpdateLength()}};function Yf(i,t,e={}){const{direction:n,startPoint:o}=e;if(i.length<2-+!!o)return null;const r=new Uf("step",n??(ve(i[i.length-1].x-i[0].x)>ve(i[i.length-1].y-i[0].y)?Te.ROW:Te.COLUMN));return j2(new V2(r,t,o),i),r}function j2(i,t){return Nr(i,t,1)}class $2 extends UC{lineEnd(){this.context.closePath()}}function G2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;const o=Ds("linear",e,i);return U2(new $2(o,n),i),o}function U2(i,t){return Nr(i,t,1)}function JC(i,t,e,n,o){let r=i._x1,s=i._y1,l=i._x2,a=i._y2;if(i._l01_a>He){const h=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,d=3*i._l01_a*(i._l01_a+i._l12_a);r=(r*h-i._x0*i._l12_2a+i._x2*i._l01_2a)/d,s=(s*h-i._y0*i._l12_2a+i._y2*i._l01_2a)/d}if(i._l23_a>He){const h=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,d=3*i._l23_a*(i._l23_a+i._l12_a);l=(l*h+i._x1*i._l23_2a-t*i._l12_2a)/d,a=(a*h+i._y1*i._l23_2a-e*i._l12_2a)/d}i.context.bezierCurveTo(r,s,l,a,i._x2,i._y2,n,i.lastPoint1)}class K2{constructor(t,e=.5,n){this.context=t,this.startPoint=n,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x2,this._y2,this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1);break;case 3:this.point({x:this._x2,y:this._y2})}(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){const{x:e,y:n}=t;if(this._point){const o=this._x2-e,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(o*o+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1):this.context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3;default:JC(this,e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function QC(i,t){return function(e,n,o={}){const{direction:r,startPoint:s}=o;if(e.length<2-+!!s)return null;if(e.length<3-+!!s)return Ql(e,o);const l=Ds(i,r,e),a=new t(l,n,s);return Nr(a,e,2),l}}const Y2=QC("catmullRom",K2);class X2{constructor(t,e=.5,n){this.context=t,this.startPoint=n,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 1:this.context.moveTo(this._x3,this._y3,this.lastPoint1),this.context.closePath();break;case 2:this.context.lineTo(this._x3,this._y3,this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1),this.context.closePath();break;case 3:this.point({x:this._x3,y:this._y3}),this.point({x:this._x4,y:this._y4}),this.point({x:this._x5,y:this._y5})}}point(t){const{x:e,y:n}=t;if(this._point){const o=this._x2-e,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(o*o+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=n;break;case 1:this._point=2,this.context.moveTo(this._x4=e,this._y4=n,t);break;case 2:this._point=3,this._x5=e,this._y5=n;break;default:JC(this,e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}const q2=QC("catmullRomClosed",X2);function Vr(i,t,e){var n,o;switch(t){case"linear":default:return Ql(i,e);case"basis":return I2(i,e);case"monotoneX":return z2(i,e);case"monotoneY":return N2(i,e);case"step":return Yf(i,.5,e);case"stepBefore":return Yf(i,0,e);case"stepAfter":return Yf(i,1,e);case"catmullRom":return Y2(i,(n=e==null?void 0:e.curveTension)!==null&&n!==void 0?n:.5,e);case"catmullRomClosed":return q2(i,(o=e==null?void 0:e.curveTension)!==null&&o!==void 0?o:.5,e);case"linearClosed":return G2(i,e)}}class vi extends w2{constructor(t){super(),this.commandList=[],t&&(this._ctx=t),this._boundsContext=new Wf(this.bounds)}setCtx(t){this._ctx=t}moveTo(t,e){return this.commandList.push([pe.M,t,e]),this._ctx&&this._ctx.moveTo(t,e),this}lineTo(t,e){return this.commandList.push([pe.L,t,e]),this._ctx&&this._ctx.lineTo(t,e),this}quadraticCurveTo(t,e,n,o){return this.commandList.push([pe.Q,t,e,n,o]),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,o),this}bezierCurveTo(t,e,n,o,r,s){return this.commandList.push([pe.C,t,e,n,o,r,s]),this._ctx&&this._ctx.bezierCurveTo(t,e,n,o,r,s),this}arcTo(t,e,n,o,r){return this.commandList.push([pe.AT,t,e,n,o,r]),this._ctx&&this._ctx.arcTo(t,e,n,o,r),this}ellipse(t,e,n,o,r,s,l,a){return this.commandList.push([pe.E,t,e,n,o,r,s,l,a]),this._ctx&&this._ctx.ellipse(t,e,n,o,r,s,l,a),this}rect(t,e,n,o){return this.commandList.push([pe.R,t,e,n,o]),this._ctx&&this._ctx.rect(t,e,n,o),this}arc(t,e,n,o,r,s){return this.commandList.push([pe.A,t,e,n,o,r,s]),this._ctx&&this._ctx.arc(t,e,n,o,r,s),this}closePath(){return this.commandList.push([pe.Z]),this._ctx&&this._ctx.closePath(),this}addCurve(t){this.curves.push(t)}clear(){this.transformCbList=null,this.commandList.length=0,this.curves.length=0}beginPath(){this.clear()}toString(){if(!this.toStringCbList){const n=[];n[pe.M]=o=>`M${o[1]} ${o[2]}`,n[pe.L]=o=>`L${o[1]} ${o[2]}`,n[pe.Q]=o=>`Q${o[1]} ${o[2]} ${o[3]} ${o[4]}`,n[pe.C]=o=>`C${o[1]} ${o[2]} ${o[3]} ${o[4]} ${o[5]} ${o[6]}`,n[pe.A]=o=>{const r=[];M2(r,o[4],o[5],o[1],o[2],o[3],o[3]);let s="";for(let l=0;l<r.length;l+=6)s+=`C${r[l]} ${r[l+1]} ${r[l+2]} ${r[l+3]} ${r[l+4]} ${r[l+5]}`;return s},n[pe.R]=o=>`M${o[1]} ${o[2]} h${o[3]} v${o[4]} H${o[1]}Z`,n[pe.Z]=o=>"Z",this.toStringCbList=n}const t=this.toStringCbList;let e="";return this.commandList.forEach(n=>{e+=t[n[0]](n)}),e}fromString(t,e,n,o,r){this.clear();const s=R2(t);return this._runCommandStrList(s,e,n,o,r),this._updateBounds(),this}fromLine(t){const{points:e,curveType:n,clipRangeByDimension:o}=t.attribute;if(!e)return;const r=Vr(e,n);o==="x"?this.direction=Te.ROW:o==="y"?this.direction=Te.COLUMN:o==="auto"&&(this.direction=r.direction),this.curves=r.curves}fromCustomPath2D(t,e,n,o,r){return this.clear(),this._runCommandList(t.commandList,e,n,o,r),this._updateBounds(),this}transform(t,e,n,o){const r=this.commandList;if(!this.transformCbList){const s=[];s[pe.M]=this.moveToTransform,s[pe.L]=this.lineToTransform,s[pe.Q]=this.quadraticCurveToTransform,s[pe.C]=this.bezierCurveToTransform,s[pe.AT]=this.arcToTransform,s[pe.E]=this.ellipseTransform,s[pe.R]=this.rectTransform,s[pe.A]=this.arcTransform,s[pe.Z]=this.closePathTransform,this.transformCbList=s}r.forEach(s=>{this.transformCbList[s[0]](s,t,e,n,o)}),this._updateBounds()}moveToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n}lineToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n}quadraticCurveToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o+e,t[4]=t[4]*r+n}bezierCurveToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o+e,t[4]=t[4]*r+n,t[5]=t[5]*o+e,t[6]=t[6]*r+n}arcToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o+e,t[4]=t[4]*r+n,t[5]=t[5]*(o+r)/2}ellipseTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o,t[4]=t[4]*r}rectTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o,t[4]=t[4]*r}arcTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*(o+r)/2}closePathTransform(){}_runCommandStrList(t,e=0,n=0,o=1,r=1){let s,l,a,h,d,u=null,c=0,g=0,f=0,p=0;for(let m=0,v=t.length;m<v;++m){switch(s=t[m],o===1&&r===1||(s=Z2(s,o,r)),s[0]){case"l":c+=s[1],g+=s[2],this.lineTo(c+e,g+n);break;case"L":c=s[1],g=s[2],this.lineTo(c+e,g+n);break;case"h":c+=s[1],this.lineTo(c+e,g+n);break;case"H":c=s[1],this.lineTo(c+e,g+n);break;case"v":g+=s[1],this.lineTo(c+e,g+n);break;case"V":g=s[1],this.lineTo(c+e,g+n);break;case"m":c+=s[1],g+=s[2],this.moveTo(c+e,g+n);break;case"M":c=s[1],g=s[2],this.moveTo(c+e,g+n);break;case"c":l=c+s[5],a=g+s[6],f=c+s[3],p=g+s[4],this.bezierCurveTo(c+s[1]+e,g+s[2]+n,f+e,p+n,l+e,a+n),c=l,g=a;break;case"C":c=s[5],g=s[6],f=s[3],p=s[4],this.bezierCurveTo(s[1]+e,s[2]+n,f+e,p+n,c+e,g+n);break;case"s":l=c+s[3],a=g+s[4],f=2*c-f,p=2*g-p,this.bezierCurveTo(f+e,p+n,c+s[1]+e,g+s[2]+n,l+e,a+n),f=c+s[1],p=g+s[2],c=l,g=a;break;case"S":l=s[3],a=s[4],f=2*c-f,p=2*g-p,this.bezierCurveTo(f+e,p+n,s[1]+e,s[2]+n,l+e,a+n),c=l,g=a,f=s[1],p=s[2];break;case"q":l=c+s[3],a=g+s[4],f=c+s[1],p=g+s[2],this.quadraticCurveTo(f+e,p+n,l+e,a+n),c=l,g=a;break;case"Q":l=s[3],a=s[4],this.quadraticCurveTo(s[1]+e,s[2]+n,l+e,a+n),c=l,g=a,f=s[1],p=s[2];break;case"t":l=c+s[1],a=g+s[2],u[0].match(/[QqTt]/)===null?(f=c,p=g):u[0]==="t"?(f=2*c-h,p=2*g-d):u[0]==="q"&&(f=2*c-f,p=2*g-p),h=f,d=p,this.quadraticCurveTo(f+e,p+n,l+e,a+n),c=l,g=a,f=c+s[1],p=g+s[2];break;case"T":l=s[1],a=s[2],f=2*c-f,p=2*g-p,this.quadraticCurveTo(f+e,p+n,l+e,a+n),c=l,g=a;break;case"a":NC(this,c+e,g+n,[s[1],s[2],s[3],s[4],s[5],s[6]+c+e,s[7]+g+n]),c+=s[6],g+=s[7];break;case"A":NC(this,c+e,g+n,[s[1],s[2],s[3],s[4],s[5],s[6]+e,s[7]+n]),c=s[6],g=s[7];break;case"z":case"Z":this.closePath()}u=s}}_runCommandList(t,e=0,n=0,o=1,r=1){if(e!==0||n!==0||o!==1||r!==1)for(let s=0,l=t.length;s<l;++s){const a=t[s].slice();switch(a[0]){case pe.L:this.lineToTransform(a,e,n,o,r);break;case pe.M:this.moveToTransform(a,e,n,o,r);break;case pe.C:this.bezierCurveToTransform(a,e,n,o,r);break;case pe.Q:this.quadraticCurveToTransform(a,e,n,o,r);break;case pe.A:this.arcToTransform(a,e,n,o,r);break;case pe.E:this.ellipseTransform(a,e,n,o,r);break;case pe.R:this.rectTransform(a,e,n,o,r);break;case pe.AT:this.arcToTransform(a,e,n,o,r);break;case pe.Z:this.closePath()}}else this.commandList=t.map(s=>s.slice())}_updateBounds(){this.bounds.clear(),lr(this.commandList,this._boundsContext)}release(){this.commandList=[],this._boundsContext=null,this._ctx=null}getLength(){if(this.direction===Te.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return ve(t.p0.y-e.p1.y)}if(this.direction===Te.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return ve(t.p0.x-e.p1.x)}return this.curves.reduce((t,e)=>t+e.getLength(),0)}getAttrAt(t){if(!this.curves)return{pos:{x:0,y:0},angle:0};let e,n=0;for(let r=0;r<this.curves.length;r++){e=this.curves[r];const s=e.getLength(this.direction);if(n+s>=t)break;n+=s}const o=(t-n)/e.getLength(this.direction);return{pos:e.getPointAt(o),angle:e.getAngleAt(o)}}}const Sn=["l",0,0,0,0,0,0,0];function Z2(i,t,e){const n=Sn[0]=i[0];if(n==="a"||n==="A")Sn[1]=t*i[1],Sn[2]=e*i[2],Sn[3]=i[3],Sn[4]=i[4],Sn[5]=i[5],Sn[6]=t*i[6],Sn[7]=e*i[7];else if(n==="h"||n==="H")Sn[1]=t*i[1];else if(n==="v"||n==="V")Sn[1]=e*i[1];else for(let o=1,r=i.length;o<r;++o)Sn[o]=(o%2==1?t:e)*i[o];return Sn}const J2={alignSelf:"auto"},fi={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new ni},ty={fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0},Xf={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},ey=Object.assign({outerBorder:Object.assign(Object.assign({},Xf),{distance:0}),innerBorder:Object.assign(Object.assign({},Xf),{distance:0})},Xf),xn={text:"",maxLineWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:`PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
border: 1px solid #E6E8ED;
|
|
307
307
|
}
|
|
308
308
|
`,document.head.appendChild(i)}WV();const wh="vtable__bubble-tooltip-element",ZA=`${wh}__content`,JA=`${wh}__triangle`,Rl=`${wh}--hidden`,Sh=`${wh}--shown`;class NV{constructor(){this._handler=new rc;const t=this._rootElement=bo("div",[wh,Rl]),e=bo("div",[ZA]),n=bo("span",[JA]);t.appendChild(n),t.appendChild(e),this._messageElement=t.querySelector(`.${ZA}`)||void 0,this._triangleElement=t.querySelector(`.${JA}`)||void 0,t.addEventListener("mousemove",()=>{this._disappearDelayId&&clearTimeout(this._disappearDelayId)}),t.addEventListener("mouseleave",()=>{this._disappearDelay=void 0,this.unbindFromCell()}),e.addEventListener("wheel",o=>{o.stopPropagation()}),e.addEventListener("copy",o=>{Lz(e)&&o.stopPropagation()})}bindToCell(t,e,n,o,r){var s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R;this._disappearDelay=o==null?void 0:o.disappearDelay,this._disappearDelayId&&clearTimeout(this._disappearDelayId);const x=this._rootElement,M=this._messageElement,T=this._triangleElement;if(x==null||x.classList.remove(Sh),x==null||x.classList.add(Rl),this._canBindToCell(t,e,n)){if(M.setAttribute("style",""),T.setAttribute("style",""),o!=null&&o.className&&x.classList.add(o.className),!((s=o==null?void 0:o.style)===null||s===void 0)&&s.bgColor&&(M.style.backgroundColor=(l=o==null?void 0:o.style)===null||l===void 0?void 0:l.bgColor),!((a=o==null?void 0:o.style)===null||a===void 0)&&a.bgColor&&(T.style.backgroundColor=(h=o==null?void 0:o.style)===null||h===void 0?void 0:h.bgColor),T.style.display=((d=o==null?void 0:o.style)===null||d===void 0?void 0:d.arrowMark)===!0?"block":"none",!((u=o==null?void 0:o.style)===null||u===void 0)&&u.fontSize&&(M.style.fontSize=((g=(c=o==null?void 0:o.style)===null||c===void 0?void 0:c.fontSize)!==null&&g!==void 0?g:12)+"px"),!((f=o==null?void 0:o.style)===null||f===void 0)&&f.fontFamily&&(M.style.fontFamily=(p=o==null?void 0:o.style)===null||p===void 0?void 0:p.fontFamily),!((m=o==null?void 0:o.style)===null||m===void 0)&&m.color&&(M.style.color=(v=o==null?void 0:o.style)===null||v===void 0?void 0:v.color),!((C=o==null?void 0:o.style)===null||C===void 0)&&C.padding&&(M.style.padding=`${(S=o==null?void 0:o.style)===null||S===void 0?void 0:S.padding.join("px ")}px`),!((_=o==null?void 0:o.style)===null||_===void 0)&&_.maxHeight&&(M.style.maxHeight=`${(y=o==null?void 0:o.style)===null||y===void 0?void 0:y.maxHeight}px`),!((w=o==null?void 0:o.style)===null||w===void 0)&&w.maxWidth&&(M.style.maxWidth=`${(A=o==null?void 0:o.style)===null||A===void 0?void 0:A.maxWidth}px`),M&&(M.textContent=o==null?void 0:o.content),this._bindToCell(t,e,n,o==null?void 0:o.position,o==null?void 0:o.referencePosition,r,(R=o==null?void 0:o.style)===null||R===void 0?void 0:R.arrowMark))return x==null||x.classList.add(Sh),x==null||x.classList.remove(Rl),!0}else this.unbindFromCell();return!1}release(){var t,e;this.unbindFromCell();const n=this._rootElement;n!=null&&n.parentElement&&n.parentElement.removeChild(n),(e=(t=this._handler)===null||t===void 0?void 0:t.release)===null||e===void 0||e.call(t),delete this._rootElement,delete this._messageElement}move(t,e,n,o,r){const s=this._rootElement;this._canBindToCell(t,e,n)?(this._bindToCell(t,e,n,o==null?void 0:o.position,o==null?void 0:o.referencePosition,r),s==null||s.classList.add(Sh),s==null||s.classList.remove(Rl)):this.unbindFromCell()}unbindFromCell(){var t;if(this._disappearDelay)this._disappearDelayId=setTimeout(()=>{const e=this._rootElement;e!=null&&e.parentElement&&(e.classList.remove(Sh),e.classList.add(Rl))},(t=this._disappearDelay)!==null&&t!==void 0?t:0);else{const e=this._rootElement;e!=null&&e.parentElement&&(e.classList.remove(Sh),e.classList.add(Rl))}}_canBindToCell(t,e,n){const o=t.getCellRangeRelativeRect({col:e,row:n}),r=t.getElement(),{bottom:s,left:l,right:a,top:h}=o;if(t.isFrozenCell(e,n))return!0;if(s<t.getFrozenRowsHeight()||a<t.getFrozenColsWidth()||l>t.tableNoFrameWidth-t.getRightFrozenColsWidth()||h>t.tableNoFrameHeight-t.getBottomFrozenRowsHeight())return!1;const{offsetHeight:d,offsetWidth:u}=r;return!(h>d)&&!(l>u)}_bindToCell(t,e,n,o,r,s,l){const a=this._rootElement,h=t.getCellRangeRelativeRect({col:e,row:n}),d=t.internalProps.tooltip.parentElement,u=t.internalProps.element.offsetWidth,{width:c}=h;if(a){let g,f;a.parentElement!==d&&d.appendChild(a),a.style.left="0px";const p=Math.min(.8*u,4*c);a.style.maxWidth=`${p}px`;const m=a.clientWidth,v=a.clientHeight;if(!o&&!r)return!1;{const M=this.getComputedPosition(t,e,n,o,r,s,l);f=M.x,g=M.y}a.style.left=`${f}px`,a.style.top=`${g}px`,K0()&&(a.style.fontSize="11px");const{x1:C,x2:S,y1:_,y2:y}=t.stateManager.menu.bounds,w=f,A=w+m,R=g,x=w+v;return!(t.stateManager.menu.isShow&&C<A&&S>w&&y>R&&_<x)}return!1}getComputedPosition(t,e,n,o,r,s,l){var a;const h=this._rootElement,d=t.getCellRangeRelativeRect({col:e,row:n}),{x:u,y:c}=t.internalProps.tooltip.parentElement.getBoundingClientRect(),{width:g,height:f,x:p,y:m}=t.internalProps.element.getBoundingClientRect(),{width:v}=d;let C,S;const _=Math.min(.8*g,4*v);h.style.maxWidth=`${_}px`;const y=h.clientWidth,w=h.clientHeight,A=l?6:0;if(o)S=o.x,C=o.y+A,this._triangleElement.style.left="50%",this._triangleElement.style.marginLeft="-5px",this._triangleElement.style.top="-5px";else if(r){let R=(a=r.placement)!==null&&a!==void 0?a:Zi.bottom;const x=r.rect.left+r.rect.width/2,M=r.rect.top+r.rect.height/2,T=r.rect.top,B=r.rect.bottom,H=r.rect.left,k=r.rect.right;let P=0;const E=()=>{P++,P>=4||(this.removeStyleFromTriangle(),R===Zi.top?(S=x-y/2,C=T-w-A,this._triangleElement.style.left="50%",this._triangleElement.style.marginLeft="-5px",this._triangleElement.style.bottom="-5px",s&&C<0&&(R=Zi.right,E())):R===Zi.bottom?(S=x-y/2,C=B+A,this._triangleElement.style.left="50%",this._triangleElement.style.marginLeft="-5px",this._triangleElement.style.top="-5px",s&&C+w>f&&(R=Zi.left,E())):R===Zi.left?(C=M-w/2,S=H-y-A,this._triangleElement.style.top="50%",this._triangleElement.style.marginTop="-5px",this._triangleElement.style.right="-5px",s&&S<0&&(R=Zi.top,E())):R===Zi.right&&(C=M-w/2,S=k+A,this._triangleElement.style.top="50%",this._triangleElement.style.marginTop="-5px",this._triangleElement.style.left="-5px",s&&S+y>g&&(R=Zi.bottom,E())))};E()}return s&&(S<0?S=0:S+h.offsetWidth>g&&(S=g-h.offsetWidth)),{x:S+p-u,y:C+m-c}}removeStyleFromTriangle(){this._triangleElement.style.left="",this._triangleElement.style.right="",this._triangleElement.style.top="",this._triangleElement.style.bottom="",this._triangleElement.style.marginLeft="",this._triangleElement.style.marginTop=""}_locate(t,e,n,o,r,s){const l=this.getComputedPosition(t,e,n,o,r,s),a=l.x,h=l.y;this._rootElement.style.left=`${a}px`,this._rootElement.style.top=`${h}px`}}class VV extends zV{createTooltipElementInternal(){return new NV}}const jV={"bubble-tooltip":function(i){return new VV(i)}};class $V{constructor(t,e){this._table=t,this._tooltipInstances={},this._bindTableEvent(t),this.confine=e}release(){var t,e;const n=this._tooltipInstances;for(const o in n)(e=(t=n[o])===null||t===void 0?void 0:t.release)===null||e===void 0||e.call(t);delete this._tooltipInstances,this._attachInfo=null}_bindToCell(t,e,n){var o;const r=this._attachInfo,s=this._getTooltipInstanceInfo(t,e);if(!r||s&&r.instance===s||((o=r.instance)===null||o===void 0||o.unbindTooltipElement(),this._attachInfo=null),!!s&&s&&s.bindTooltipElement(t,e,n,this.confine)){const l=this._table.getCellRange(t,e);this._attachInfo={range:l,instance:s,tooltipOptions:n}}}_move(t,e,n){const o=this._attachInfo;if(!o||!Vi(o.range,t,e))return;const{instance:r}=o;r==null||r.moveTooltipElement(t,e,n,this.confine)}moveToPosition(t,e,n,o){const r=this._attachInfo;if(!r||!Vi(r.range,t,e))return;const{instance:s}=r;this._attachInfo.tooltipOptions.position=n,this._attachInfo.tooltipOptions.referencePosition=o,s==null||s.locateTooltipElement(t,e,n,o,this.confine)}_unbindFromCell(){const t=this._attachInfo;if(!t)return;const{instance:e}=t;e==null||e.unbindTooltipElement(),this._attachInfo=null}_isBindCell(t,e){const n=this._attachInfo;return!!n&&Vi(n.range,t,e)}_bindTableEvent(t){t.on(nt.MOUSEENTER_CELL,e=>{if(K0())return;const{x1:n,x2:o,y1:r,y2:s}=t.stateManager.menu.bounds;if(t.stateManager.menu.isShow&&typeof e.x=="number"&&typeof e.y=="number"&&e.x>n&&e.x<o&&e.y>r&&e.y<s)return;const{col:l,row:a}=e;this.showTooltip(l,a)}),t.on(nt.MOUSEMOVE_CELL,e=>{var n,o;if(!K0()){if(!((o=(n=this._attachInfo)===null||n===void 0?void 0:n.tooltipOptions)===null||o===void 0)&&o.referencePosition){const r=this._attachInfo.tooltipOptions.referencePosition,{event:s}=e,{left:l,right:a,top:h,bottom:d}=r.rect,u=t._getMouseAbstractPoint(s,!1);u.inTable&&u.x>=l-5&&u.x<=a+5&&u.y>=h-5&&u.y<=d+5||this._unbindFromCell()}this._attachInfo&&t.stateManager.menu.isShow&&this._bindToCell(e.col,e.row)}}),t.on(nt.MOUSELEAVE_CELL,e=>{this._unbindFromCell()}),t.on(nt.SELECTED_CELL,e=>{this._isBindCell(e.col,e.row)&&this._unbindFromCell()}),t.on(nt.MOUSELEAVE_TABLE,e=>{this._unbindFromCell()}),t.on(nt.SCROLL,e=>{this._unbindFromCell()})}showTooltip(t,e){var n,o,r;let s;const l=this._table,a=l.getHeaderDescription(t,e);if(a){const h=l.getCellRangeRelativeRect({col:t,row:e});s={content:a,referencePosition:{placement:Zi.bottom,rect:h},disappearDelay:(n=l.internalProps.tooltip.overflowTextTooltipDisappearDelay)!==null&&n!==void 0?n:0,style:l.theme.tooltipStyle}}else if(oe((o=l.internalProps.tooltip)===null||o===void 0?void 0:o.isShowOverflowTextTooltip)?l.internalProps.tooltip.isShowOverflowTextTooltip(t,e,l):l.internalProps.tooltip.isShowOverflowTextTooltip){const h=l.getCellOverflowText(t,e),d=l.getCellRangeRelativeRect({col:t,row:e});h&&(s={content:a?`${a}
|
|
309
|
-
${h}`:h,referencePosition:{placement:Zi.bottom,rect:d},disappearDelay:(r=l.internalProps.tooltip.overflowTextTooltipDisappearDelay)!==null&&r!==void 0?r:0,style:l.theme.tooltipStyle})}s?this._bindToCell(t,e,s):this._unbindFromCell()}_getTooltipInstanceInfo(t,e){const n=this._table,o=this._tooltipInstances;return o&&o["bubble-tooltip"]||o&&(o["bubble-tooltip"]=jV["bubble-tooltip"](n))}isBinded(t){var e;return JSON.stringify(t)===JSON.stringify((e=this._attachInfo)===null||e===void 0?void 0:e.tooltipOptions)}}const vg=()=>{Bt.registerComponent("axis",pV),Bt.registerFunction("computeAxisComponentWidth",bV),Bt.registerFunction("computeAxisComponentHeight",CV),Bt.registerFunction("getAxisConfigInPivotChart",u8)},bg=()=>{Bt.registerComponent("emptyTip",_V)},Cg=()=>{Bt.registerFunction("createLegend",HV)},yg=()=>{Bt.registerComponent("menuHandler",DV)},_g=()=>{Bt.registerComponent("title",OV)},wg=()=>{Bt.registerComponent("tooltipHandler",$V)};class GV{constructor(t){this.titleRows=[],this.showedTitleRows=[],this.rowNow=-1,this.skipStartRow=-1,this.skipEndRow=-1,this.table=t,this.table.on("scroll",e=>{e.scrollDirection==="vertical"&&this.updateGroupTitle()}),this.table.on("resize_column",e=>{this.updateGroupTitle()})}updateGroupTitle(){this.table.scrollTop===0?(this.titleRows=[],this.showedTitleRows=[]):this.skipStartRow!==-1&&this.skipEndRow!==-1&&this.skipStartRow!==this.table.scenegraph.proxy.bodyTopRow-1?(this.table.scenegraph.proxy.screenTopRow<=this.skipStartRow||this.table.scenegraph.proxy.screenTopRow>=this.skipEndRow)&&(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()):(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()),this.updateScenegraph()}updateGroupTitleInfo(){this.rowNow=this.table.scenegraph.proxy.screenTopRow+this.titleRows.length;const t=this.table.getRecordIndexByCell(0,this.rowNow),e=this.table.getRecordIndexByCell(0,this.rowNow+1);this.getTitleRowsByRecordIndex(t,e)}getTitleRowsByRecordIndex(t,e){it(t)||(t=[t]),it(e)||(e=[e]);for(let l=0;l<t.length;l++){const a=t.slice(0,l+1);this.table.dataSource.getRaw(a)}const n=[],o=e.length===t.length+1;let r=t.slice(0,o?t.length:t.length-1);const s=this.table.dataSource.currentIndexedData;for(let l=this.rowNow-this.table.columnHeaderLevelCount;l>=0;l--){const a=s[l];if(it(a)&&r.length===a.length){let h=!0;for(let d=0;d<a.length;d++)if(a[d]!==r[d]){h=!1;break}h&&(n.push(l+this.table.columnHeaderLevelCount),r=r.slice(0,r.length-1))}else if(a===t[0]){n.push(l+this.table.columnHeaderLevelCount);break}}this.titleRows=n.reverse()}updateScenegraph(){const{table:t}=this,{shadowGroup:e,shadowGroupFrozen:n}=KV(t);this.showedTitleRows.length=0;let o=0;for(let r=0;r<t.colCount;r++){let s;r<t.frozenColCount?(s=new ie({x:t.getColsWidth(0,r-1),y:t.getFrozenRowsHeight()}),n.add(s)):(s=new ie({x:t.getColsWidth(t.frozenColCount,r-1),y:t.getFrozenRowsHeight()}),e.add(s)),s.col=r;for(let l=0;l<this.titleRows.length;l++){const a=this.titleRows[l];if(UV(a,this.rowNow,t.scenegraph.proxy.screenTopRow,this.titleRows)){r===0&&o++;continue}r===0&&this.showedTitleRows.push(a);const h=t.scenegraph.getCell(r,a);if(h.role==="cell"){const d=QA(h);d.setAttributes({y:40*l}),s.add(d)}else{const d=po(r,a,t,!0,!0);d.setAttributes({y:40*l}),s.add(d)}}}o>0&&this.skipStartRow===-1&&this.skipEndRow===-1&&(this.skipStartRow=t.scenegraph.proxy.screenTopRow-1,this.skipEndRow=t.scenegraph.proxy.screenTopRow+1)}}function UV(i,t,e,n){return i===t&&i!==e+n.length-1?!0:i===e+n.indexOf(i)+1&&i<t}function QA(i){const t=i.clone();if(t.role=i.role,t.col=i.col,t.row=i.row,t.mergeStartCol=i.mergeStartCol,t.mergeStartRow=i.mergeStartRow,t.mergeEndCol=i.mergeEndCol,t.mergeEndRow=i.mergeEndRow,t.contentWidth=i.contentWidth,t.contentHeight=i.contentHeight,t.role==="cell"){const e=ke({x:0,y:0,width:t.attribute.width,height:t.attribute.height});t.add(e)}if(i.type==="group"){const e=t;i.forEachChildren(n=>{const o=QA(n);e.add(o)})}return t}function KV(i){const t=i.scenegraph.colHeaderGroup,e=i.scenegraph.cornerHeaderGroup;if(!t.border){const r=ke({x:0,y:0,width:0,height:0,cursor:"pointer"});t.add(r),t.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=wr(a),{col:d,row:u}=h;tT(u-l.indexOf(u),i)})}if(!e.border){const r=ke({x:0,y:0,width:0,height:0,cursor:"pointer"});e.add(r),e.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=wr(a),{col:d,row:u}=h;tT(u-l.indexOf(u),i)})}const n=t.border.shadowRoot,o=e.border.shadowRoot;return n.removeAllChild(),o.removeAllChild(),{shadowGroup:n,shadowGroupFrozen:o}}function tT(i,t){const e=t.getDrawRange();if(z(i)&&i>=t.frozenRowCount){const n=t.getFrozenRowsHeight(),o=t.getRowsHeight(0,i-1);t.scrollTop=Math.min(o-n,t.getAllRowsHeight()-e.height)-1}t.scenegraph.updateNextFrame()}const YV=()=>{Bt.registerComponent("listTreeStickCellPlugin",GV)},XV={};function qV(){return Ga(XV,hg)}function ZV(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C){var S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K;const U=qV()[d],Q=f._getCellStyle(o,r),dt=wc("padding",Q,o,r,f);if(z(dt)&&(a=dt),!i){const pt=ds(o,r,p,f);v&&(i=f.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(_=(S=p==null?void 0:p.group)===null||S===void 0?void 0:S.lineWidth)!==null&&_!==void 0?_:void 0,fill:(w=(y=p==null?void 0:p.group)===null||y===void 0?void 0:y.fill)!==null&&w!==void 0?w:void 0,stroke:(R=(A=p==null?void 0:p.group)===null||A===void 0?void 0:A.stroke)!==null&&R!==void 0?R:void 0,strokeArrayWidth:pt,strokeArrayColor:(M=(x=p==null?void 0:p.group)===null||x===void 0?void 0:x.strokeArrayColor)!==null&&M!==void 0?M:void 0,cursor:(B=(T=p==null?void 0:p.group)===null||T===void 0?void 0:T.cursor)!==null&&B!==void 0?B:void 0,lineDash:(k=(H=p==null?void 0:p.group)===null||H===void 0?void 0:H.lineDash)!==null&&k!==void 0?k:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius}),i&&i.role==="cell"||((i=new ie({x:e,y:n,width:s,height:l,lineWidth:(E=(P=p==null?void 0:p.group)===null||P===void 0?void 0:P.lineWidth)!==null&&E!==void 0?E:void 0,fill:(I=(F=p==null?void 0:p.group)===null||F===void 0?void 0:F.fill)!==null&&I!==void 0?I:void 0,stroke:(D=(L=p==null?void 0:p.group)===null||L===void 0?void 0:L.stroke)!==null&&D!==void 0?D:void 0,strokeArrayWidth:pt,strokeArrayColor:(V=(O=p==null?void 0:p.group)===null||O===void 0?void 0:O.strokeArrayColor)!==null&&V!==void 0?V:void 0,cursor:(j=(W=p==null?void 0:p.group)===null||W===void 0?void 0:W.cursor)!==null&&j!==void 0?j:void 0,lineDash:(X=($=p==null?void 0:p.group)===null||$===void 0?void 0:$.lineDash)!==null&&X!==void 0?X:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}if(i.AABBBounds.width(),C&&Array.isArray(f.getCellValue(o,r))||!C){const pt=new pl(m,{stroke:!1,x:a[3],y:a[0],canvas:(K=f.canvas)!==null&&K!==void 0?K:f.scenegraph.stage.window.getContext().canvas,mode:f.options.mode,modeParams:f.options.modeParams,spec:u,ClassType:U,width:s-a[3]-a[1],height:l-a[2]-a[0],chartInstance:c,dataId:g,data:f.getCellValue(o,r)||[],cellPadding:a,dpr:f.internalProps.pixelRatio,axes:f.isPivotChart()?f.internalProps.layoutMap.getChartAxes(o,r):[],tableChartOption:f.options.chartOption});i.appendChild(pt),f.internalProps.layoutMap.setChartInstance(o,r,pt.chartInstance)}return i}function JV(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v){var C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$;if(!i){const dt=ds(o,r,f,g);v&&(i=g.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:l,height:a,lineWidth:(S=(C=f==null?void 0:f.group)===null||C===void 0?void 0:C.lineWidth)!==null&&S!==void 0?S:void 0,fill:(y=(_=f==null?void 0:f.group)===null||_===void 0?void 0:_.fill)!==null&&y!==void 0?y:void 0,stroke:(A=(w=f==null?void 0:f.group)===null||w===void 0?void 0:w.stroke)!==null&&A!==void 0?A:void 0,strokeArrayWidth:dt,strokeArrayColor:(x=(R=f==null?void 0:f.group)===null||R===void 0?void 0:R.strokeArrayColor)!==null&&x!==void 0?x:void 0,cursor:(T=(M=f==null?void 0:f.group)===null||M===void 0?void 0:M.cursor)!==null&&T!==void 0?T:void 0,lineDash:(H=(B=f==null?void 0:f.group)===null||B===void 0?void 0:B.lineDash)!==null&&H!==void 0?H:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),i&&i.role==="cell"||((i=new ie({x:e,y:n,width:l,height:a,lineWidth:(P=(k=f==null?void 0:f.group)===null||k===void 0?void 0:k.lineWidth)!==null&&P!==void 0?P:void 0,fill:(F=(E=f==null?void 0:f.group)===null||E===void 0?void 0:E.fill)!==null&&F!==void 0?F:void 0,stroke:(L=(I=f==null?void 0:f.group)===null||I===void 0?void 0:I.stroke)!==null&&L!==void 0?L:void 0,strokeArrayWidth:dt,strokeArrayColor:(O=(D=f==null?void 0:f.group)===null||D===void 0?void 0:D.strokeArrayColor)!==null&&O!==void 0?O:void 0,cursor:(W=(V=f==null?void 0:f.group)===null||V===void 0?void 0:V.cursor)!==null&&W!==void 0?W:void 0,lineDash:($=(j=f==null?void 0:f.group)===null||j===void 0?void 0:j.lineDash)!==null&&$!==void 0?$:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}let X;if(c){let dt=o,pt=r;m&&(dt=m.start.col,pt=m.start.row),X=g.getCellIcons(dt,pt)}let K=0,U=0;if(Array.isArray(X)&&X.length!==0){const{leftIconWidth:dt,rightIconWidth:pt,absoluteLeftIconWidth:xt,absoluteRightIconWidth:G}=Ac(X,i,m,g);K=dt+pt,U=dt,i.forEachChildren(q=>{q.role==="icon-left"?q.setAttribute("x",q.attribute.x+h[3]):q.role==="icon-right"?q.setAttribute("x",q.attribute.x+l-pt-h[1]):q.role==="icon-absolute-right"&&q.setAttribute("x",q.attribute.x+l-G-h[1])}),i.forEachChildren(q=>{u==="middle"?q.setAttribute("y",(a-q.AABBBounds.height())/2):u==="bottom"?q.setAttribute("y",a-q.AABBBounds.height()-h[2]):q.setAttribute("y",h[0])})}const Q=QV(o,r,s-K,l,a,h,f,p,g);return Q&&i.appendChild(Q),Q.render(),l-=h[1]+h[3]+K,a-=h[0]+h[2],d==="center"?Q.setAttribute("x",h[3]+U+(l-Q.AABBBounds.width())/2):d==="right"?Q.setAttribute("x",h[3]+U+l-Q.AABBBounds.width()):Q.setAttribute("x",h[3]+U),u==="middle"?Q.setAttribute("y",h[0]+(a-Q.AABBBounds.height())/2):u==="bottom"?Q.setAttribute("y",h[0]+a-Q.AABBBounds.height()):Q.setAttribute("y",h[0]),i}function QV(i,t,e,n,o,r,s,l,a){var h,d,u,c;const g=a._getCellStyle(i,t),f=bt("size",g,i,t,a),p=bt("spaceBetweenTextAndIcon",g,i,t,a),m=bt("defaultFill",g,i,t,a),v=bt("defaultStroke",g,i,t,a),C=bt("disableFill",g,i,t,a),S=bt("checkedFill",g,i,t,a),_=bt("checkedStroke",g,i,t,a),y=bt("disableCheckedFill",g,i,t,a),w=bt("disableCheckedStroke",g,i,t,a),A=bt("checkIconImage",g,i,t,a),R=bt("indeterminateIconImage",g,i,t,a),x=a.getCellValue(i,t),M=a.getCellOriginValue(i,t);let T,B,H=(h=x)!==null&&h!==void 0?h:"";se(x)?(T=x.checked,B=x.disable,H=(d=x.text)!==null&&d!==void 0?d:""):typeof x=="boolean"&&(T=x,H=""),T=a.stateManager.syncCheckedState(i,t,l.field,T);const k=to(i,t,a),P=a._getCellStyle(i,t),E=(u=P.autoWrapText)!==null&&u!==void 0?u:a.internalProps.autoWrapText,{lineClamp:F}=P,{checked:I,disable:L}=l;if(T==null||typeof T=="function"){const X=Ze(I,{col:i,row:t,table:a,context:null,value:x,dataValue:M});T=a.stateManager.syncCheckedState(i,t,l.field,X)}const D=Ze(L,{col:i,row:t,table:a,context:null,value:x,dataValue:M}),O=e==="auto",V=a.isAutoRowHeight(t),W={text:H.length===1?H[0]:H,maxLineWidth:O?1/0:n-(r[1]+r[3]+k)-f-p,textBaseline:"top",autoWrapText:E,lineClamp:F,wordBreak:"break-word",heightLimit:V?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:k,whiteSpace:H.length!==1||E?"normal":"no-wrap"},j={x:0,y:0,text:s.text?Object.assign({},s.text,W):W,icon:{width:Math.floor(f/1.4),height:Math.floor(f/1.4)},box:{width:f,height:f},spaceBetweenTextAndIcon:p,disabled:(c=B??D)!==null&&c!==void 0&&c};T==="indeterminate"?(j.checked=void 0,j.indeterminate=!0):(j.checked=T,j.indeterminate=void 0),m&&(j.box.fill=m),v&&(j.box.stroke=v),C&&(j.box.disableFill=C),S&&(j.box.checkedFill=S),_&&(j.box.checkedStroke=_),y&&(j.box.disableCheckedFill=y),w&&(j.box.disableCheckedStroke=w),A&&(j.icon.checkIconImage=A),R&&(j.icon.indeterminateIconImage=R);const $=new mr(j);return $.name="checkbox",$}function t9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f){var p,m,v,C,S,_,y,w,A,R,x,M;if(!i){const H=ds(o,r,g,c);(i=new ie({x:e,y:n,width:l,height:a,lineWidth:(m=(p=g==null?void 0:g.group)===null||p===void 0?void 0:p.lineWidth)!==null&&m!==void 0?m:void 0,fill:(C=(v=g==null?void 0:g.group)===null||v===void 0?void 0:v.fill)!==null&&C!==void 0?C:void 0,stroke:(_=(S=g==null?void 0:g.group)===null||S===void 0?void 0:S.stroke)!==null&&_!==void 0?_:void 0,strokeArrayWidth:H,strokeArrayColor:(w=(y=g==null?void 0:g.group)===null||y===void 0?void 0:y.strokeArrayColor)!==null&&w!==void 0?w:void 0,cursor:(R=(A=g==null?void 0:g.group)===null||A===void 0?void 0:A.cursor)!==null&&R!==void 0?R:void 0,lineDash:(M=(x=g==null?void 0:g.group)===null||x===void 0?void 0:x.lineDash)!==null&&M!==void 0?M:void 0,lineCap:"butt",clip:!0,cornerRadius:g.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i)}const{width:T,height:B}=e9(o,r,s,l,a,h,g,f,i,c);return l-=h[1]+h[3],a-=h[0]+h[2],i.forEachChildren(H=>{d==="center"?H.setAttribute("x",h[3]+H.attribute.x+(l-T)/2):d==="right"?H.setAttribute("x",h[3]+H.attribute.x+l-T):H.setAttribute("x",h[3]+H.attribute.x),u==="middle"?H.setAttribute("y",h[0]+H.attribute.y+(a-B)/2):u==="bottom"?H.setAttribute("y",h[0]+H.attribute.y+a-B):H.setAttribute("y",h[0]+H.attribute.y)}),i}function e9(i,t,e,n,o,r,s,l,a,h){var d,u;const c=h._getCellStyle(i,t);let g=bt("size",c,i,t,h),f=bt("innerRadius",c,i,t,h),p=bt("outerRadius",c,i,t,h);const m=bt("spaceBetweenTextAndIcon",c,i,t,h),v=bt("spaceBetweenRadio",c,i,t,h),C=bt("defaultFill",c,i,t,h),S=bt("defaultStroke",c,i,t,h),_=bt("disableFill",c,i,t,h),y=bt("checkedFill",c,i,t,h),w=bt("checkedStroke",c,i,t,h),A=bt("disableCheckedFill",c,i,t,h),R=bt("disableCheckedStroke",c,i,t,h);at(p)?g=2*p:p=Math.round(g/2),(!at(f)||f<0)&&(f=Math.round(p/7*3));const x=h.getCellValue(i,t),M=h.getCellOriginValue(i,t),T=to(i,t,h),B=h._getCellStyle(i,t),H=(d=B.autoWrapText)!==null&&d!==void 0?d:h.internalProps.autoWrapText,{lineClamp:k}=B,P=e==="auto",E=h.heightMode==="autoHeight",F={maxLineWidth:P?1/0:n-(r[1]+r[3]+T)-g-m,textBaseline:"top",autoWrapText:H,lineClamp:k,wordBreak:"break-word",heightLimit:E?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:T},I={x:0,y:0,text:s.text?Object.assign({},s.text,F):F,circle:{innerRadius:f,outerRadius:p},spaceBetweenTextAndIcon:m};C&&(I.circle.fill=C),S&&(I.circle.stroke=S),_&&(I.circle.disableFill=_),y&&(I.circle.checkedFill=y),w&&(I.circle.checkedStroke=w),A&&(I.circle.disableCheckedFill=A),R&&(I.circle.disableCheckedStroke=R);let L=0,D=0;const O=(u=l.radioDirectionInCell)!==null&&u!==void 0?u:"vertical";if(it(x))x.forEach((V,W)=>{const j=eT(V,M,W,i,t,l,H,I,h);j&&a.appendChild(j),j.id=`radio-${i}-${t}-${W}`,j.render();const $=j.AABBBounds;O==="vertical"?(j.setAttribute("y",D),D+=$.height()+(W!==x.length-1?v:0),L=Math.max(L,$.width())):O==="horizontal"&&(j.setAttribute("x",L),L+=$.width()+(W!==x.length-1?v:0),D=Math.max(D,$.height()))});else{const V=eT(x,M,void 0,i,t,l,H,I,h);V&&a.appendChild(V),V.id=`radio-${i}-${t}`,V.render();const W=V.AABBBounds;L=W.width(),D=W.height()}return{width:L,height:D}}function eT(i,t,e,n,o,r,s,l,a){const h=i9(i,t,e,n,o,r,a),d=n9(i,t,n,o,r,a),u=se(i)?i.text:ui(i)?"":i??"",c=St({},l,{checked:h,disabled:d,text:{text:u.length===1?u[0]:u,whiteSpace:u.length!==1||s?"normal":"no-wrap"},boundsPadding:0}),g=new Na(c);return g.name="radio",g}function i9(i,t,e,n,o,r,s){var l,a;const h=(l=r.radioCheckType)!==null&&l!==void 0?l:"column";let d,u;return se(i)?d=i.checked:typeof i=="boolean"&&(d=i),d=s.stateManager.syncRadioState(n,o,r.field,h,e,d),d!=null&&typeof d!="function"||(u=Ze(r.checked,{col:n,row:o,table:s,context:null,value:i,dataValue:t}),d=s.stateManager.syncRadioState(n,o,r.field,h,e,u)),(a=d??u)!==null&&a!==void 0&&a}function n9(i,t,e,n,o,r){var s;let l;se(i)&&(l=i.disable);const a=Ze(o.disable,{col:e,row:n,table:r,context:null,value:i,dataValue:t});return(s=l??a)!==null&&s!==void 0&&s}const Mr=new BO,Br=new Jr;function o9(i,t,e,n,o,r,s,l,a,h,d,u){var c,g,f,p,m,v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L;if(!i){const O=ds(o,r,d,h);u&&(i=h.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(g=(c=d==null?void 0:d.group)===null||c===void 0?void 0:c.lineWidth)!==null&&g!==void 0?g:void 0,fill:(p=(f=d==null?void 0:d.group)===null||f===void 0?void 0:f.fill)!==null&&p!==void 0?p:void 0,stroke:(v=(m=d==null?void 0:d.group)===null||m===void 0?void 0:m.stroke)!==null&&v!==void 0?v:void 0,strokeArrayWidth:O,strokeArrayColor:(S=(C=d==null?void 0:d.group)===null||C===void 0?void 0:C.strokeArrayColor)!==null&&S!==void 0?S:void 0,cursor:(y=(_=d==null?void 0:d.group)===null||_===void 0?void 0:_.cursor)!==null&&y!==void 0?y:void 0,lineDash:(A=(w=d==null?void 0:d.group)===null||w===void 0?void 0:w.lineDash)!==null&&A!==void 0?A:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius}),i&&i.role==="cell"||((i=new ie({x:e,y:n,width:s,height:l,lineWidth:(x=(R=d==null?void 0:d.group)===null||R===void 0?void 0:R.lineWidth)!==null&&x!==void 0?x:void 0,fill:(T=(M=d==null?void 0:d.group)===null||M===void 0?void 0:M.fill)!==null&&T!==void 0?T:void 0,stroke:(H=(B=d==null?void 0:d.group)===null||B===void 0?void 0:B.stroke)!==null&&H!==void 0?H:void 0,strokeArrayWidth:O,strokeArrayColor:(P=(k=d==null?void 0:d.group)===null||k===void 0?void 0:k.strokeArrayColor)!==null&&P!==void 0?P:void 0,cursor:(F=(E=d==null?void 0:d.group)===null||E===void 0?void 0:E.cursor)!==null&&F!==void 0?F:void 0,lineDash:(L=(I=d==null?void 0:d.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}const D=r9(o,r,s,l,a,h);return D&&i.appendChild(D),i}function r9(i,t,e,n,o,r){let s,l;const a=r.internalProps.layoutMap.getBody(i,t).sparklineSpec,h=r.getCellValue(i,t);if(!Array.isArray(h))return;const d=o[3],u=o[0];e-=o[1]+o[3];const c=n-=o[0]+o[2];if(typeof a=="function"){const S={col:i,row:t,dataValue:r.getCellOriginValue(i,t)||"",value:r.getCellValue(i,t)||"",rect:r.getCellRangeRelativeRect(r.getCellRange(i,t)),table:r};s=a(S),l=iT(s,d,u,e,n)}else s=a,l=iT(a,d,u,e,n);const g=[],f=[];let p,m;if(typeof s.xField=="object")Mr.domain(s.xField.domain),p=s.xField.field;else if(typeof s.xField=="string"){const S=h.map(_=>_[s.xField]);Mr.domain(S),p=s.xField}else Array.isArray(h)&&(Mr.domain(Array.from({length:h.length},(S,_)=>_)),p=s.xField);if(Mr.range([0,e]),typeof s.yField=="object")Br.domain(s.yField.domain),m=s.yField.field;else if(typeof s.yField=="string"){const S=nT(h,s.yField);Br.domain([Math.min(...S),Math.max(...S)]),m=s.yField}else if(Array.isArray(h)){const S=nT(h);Br.domain([Math.min(...S),Math.max(...S)]),m=s.yField}if(Br.range([0,n]),typeof s.xField=="object"&&Array.isArray(s.xField.domain)){const S=h.map(y=>y[s.xField.field]),_=s.xField.domain;for(let y=0;y<_.length;y++){let w=!1;for(let A=0;A<S.length;A++)if(_[y]===S[A]){const R=h[A];if(!z(R[p])||!z(R[m]))break;g.push({x:0+Mr.scale(R[p]),y:c-Br.scale(R[m]),defined:z(R[m])}),f.push(R),w=!0;break}w||(g.push({x:0+Mr.scale(_[y]),y:0,defined:!1}),f.push({[p]:_[y],[m]:null}))}}else for(let S=0;S<h.length;S++){const _=h[S];g.push({x:0+Mr.scale(p?_[p]:S),y:c-Br.scale(m?_[m]:_),defined:z(m?_[m]:_),rawData:_}),f.push(_)}const v=l.getChildByName("sparkline-line");v&&v.setAttribute("points",g),v.bandwidth=Mr.step(),v.min=Br.range()[0],v.max=Br.range()[1];const C=l.getChildByName("sparkline-symbol-group");if(C){const S=s.pointShowRule==="isolatedPoint";if(s.pointShowRule==="all")for(let _=0;_<g.length;_++){const{x:y,y:w,defined:A}=g[_];if(A){const R=ya({x:y,y:w});C.appendChild(R)}}else if(S)for(let _=0;_<g.length;_++){const{x:y,y:w,defined:A}=g[_];if(A&&(!g[_-1]||!g[_-1].defined)&&(!g[_+1]||!g[_+1].defined)){const R=ya({x:y,y:w});C.appendChild(R)}}}return l}function iT(i,t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R,x,M;let T;T=typeof i=="function"?i(null):i;const B=new ie({x:t,y:e,width:n,height:o,stroke:!1,fill:!1});if(B.name="sparkline",T.type==="line"){const H=un({x:0,y:0,curveType:T.smooth?"monotoneX":"linear",stroke:(l=(s=(r=T.line)===null||r===void 0?void 0:r.style)===null||s===void 0?void 0:s.stroke)!==null&&l!==void 0?l:"blue",lineWidth:(d=(h=(a=T.line)===null||a===void 0?void 0:a.style)===null||h===void 0?void 0:h.strokeWidth)!==null&&d!==void 0?d:2});H.name="sparkline-line",B.addChild(H),T.crosshair&&(H.hover=(c=(u=T.crosshair)===null||u===void 0?void 0:u.style)!==null&&c!==void 0?c:{stroke:"#000",interpolate:"linear"});const k=new ie({x:0,y:0,width:n,height:o,stroke:!1,fill:!1});k.name="sparkline-symbol-group",k.setTheme({symbol:{stroke:(p=(f=(g=T.point)===null||g===void 0?void 0:g.style)===null||f===void 0?void 0:f.stroke)!==null&&p!==void 0?p:"#000",lineWidth:(C=(v=(m=T.point)===null||m===void 0?void 0:m.style)===null||v===void 0?void 0:v.strokeWidth)!==null&&C!==void 0?C:1,fill:(y=(_=(S=T.point)===null||S===void 0?void 0:S.style)===null||_===void 0?void 0:_.fill)!==null&&y!==void 0?y:"#000",size:2*((R=(A=(w=T.point)===null||w===void 0?void 0:w.style)===null||A===void 0?void 0:A.size)!==null&&R!==void 0?R:3),symbolType:"circle"}}),B.addChild(k),k.hover=(M=(x=T.point)===null||x===void 0?void 0:x.hover)!==null&&M!==void 0&&M}return B}function nT(i,t){const e=[];for(let n=0;n<i.length;n++){const o=i[n];z(t)&&z(o[t])?e.push(o[t]):!z(t)&&z(o)&&e.push(o)}return e}const iv=fn();function s9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m){var v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt;const pt=g._getCellStyle(n,o),xt=wc("padding",pt,n,o,g);!((v=g.options.customConfig)===null||v===void 0)&&v.imageMargin?h=Yt((C=g.options.customConfig)===null||C===void 0?void 0:C.imageMargin):z(xt)&&(h=xt),!((S=f==null?void 0:f.text)===null||S===void 0)&&S.textAlign&&(d=(_=f==null?void 0:f.text)===null||_===void 0?void 0:_.textAlign),!((y=f==null?void 0:f.text)===null||y===void 0)&&y.textBaseline&&(u=(w=f==null?void 0:f.text)===null||w===void 0?void 0:w.textBaseline);const G=ds(n,o,f,g);let q,ot;if(m&&(q=g.scenegraph.highPerformanceGetCell(n,o,!0),q&&q.role==="cell"&&q.setAttributes({x:t,y:e,width:r,height:s,lineWidth:(R=(A=f==null?void 0:f.group)===null||A===void 0?void 0:A.lineWidth)!==null&&R!==void 0?R:void 0,fill:(M=(x=f==null?void 0:f.group)===null||x===void 0?void 0:x.fill)!==null&&M!==void 0?M:void 0,stroke:(B=(T=f==null?void 0:f.group)===null||T===void 0?void 0:T.stroke)!==null&&B!==void 0?B:void 0,strokeArrayWidth:G,strokeArrayColor:(k=(H=f==null?void 0:f.group)===null||H===void 0?void 0:H.strokeArrayColor)!==null&&k!==void 0?k:void 0,cursor:(E=(P=f==null?void 0:f.group)===null||P===void 0?void 0:P.cursor)!==null&&E!==void 0?E:void 0,lineDash:(I=(F=f==null?void 0:f.group)===null||F===void 0?void 0:F.lineDash)!==null&&I!==void 0?I:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})),q&&q.role==="cell"||(q=new ie({x:t,y:e,width:r,height:s,lineWidth:(D=(L=f==null?void 0:f.group)===null||L===void 0?void 0:L.lineWidth)!==null&&D!==void 0?D:void 0,fill:(V=(O=f==null?void 0:f.group)===null||O===void 0?void 0:O.fill)!==null&&V!==void 0?V:void 0,stroke:(j=(W=f==null?void 0:f.group)===null||W===void 0?void 0:W.stroke)!==null&&j!==void 0?j:void 0,strokeArrayWidth:G,strokeArrayColor:(X=($=f==null?void 0:f.group)===null||$===void 0?void 0:$.strokeArrayColor)!==null&&X!==void 0?X:void 0,cursor:(U=(K=f==null?void 0:f.group)===null||K===void 0?void 0:K.cursor)!==null&&U!==void 0?U:void 0,lineDash:(dt=(Q=f==null?void 0:f.group)===null||Q===void 0?void 0:Q.lineDash)!==null&&dt!==void 0?dt:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),q.role="cell",q.col=n,q.row=o,i==null||i.addCellGroup(q)),c){let mt=n,st=o;p&&(mt=p.start.col,st=p.start.row),ot=g.getCellIcons(mt,st)}let ct=0,_t=0;if(Array.isArray(ot)&&ot.length!==0){const{leftIconWidth:mt,rightIconWidth:st,absoluteLeftIconWidth:Ft,absoluteRightIconWidth:Ht}=Ac(ot,q,p,g);ct=mt,_t=st,q.forEachChildren(vt=>{vt.role==="icon-left"?vt.setAttribute("x",vt.attribute.x+h[3]):vt.role==="icon-right"?vt.setAttribute("x",vt.attribute.x+r-st-h[1]):vt.role==="icon-absolute-right"&&vt.setAttribute("x",vt.attribute.x+r-Ht-h[1])}),q.forEachChildren(vt=>{u==="middle"?vt.setAttribute("y",(s-vt.AABBBounds.height())/2):u==="bottom"?vt.setAttribute("y",s-vt.AABBBounds.height()-h[2]):vt.setAttribute("y",h[0])}),q._cellLeftIconWidth=ct,q._cellRightIconWidth=_t}const yt=g.getCellValue(n,o),ht=document.createElement("video");ht.addEventListener("loadeddata",()=>{a&&jx(n,o,ht.videoWidth,ht.videoHeight,g.scenegraph,h,q);const{width:mt,height:st,isMerge:Ft}=cl(q,g);if(l){const{width:Le,height:Fe}=_c(ht.videoWidth,ht.videoHeight,mt-h[1]-h[3],st-h[0]-h[2]),me=vm(0,0,mt,st,Le,Fe,d,u,h);et.setAttributes({width:Le,height:Fe,x:me.x,y:me.y,dx:0})}else et.setAttributes({x:h[3],y:h[0],width:mt-h[1]-h[3],height:st-h[2]-h[0],dy:0});Ft&&bm(q.mergeStartCol,q.mergeEndCol,q.mergeStartRow,q.mergeEndRow,g);const{width:Ht,height:vt}=cl(q,g),Pt=Math.floor(Math.min(Ht-h[1]-h[3],vt-h[2]-h[0])/2),_e=0+(Ht>et.attribute.width?et.attribute.x-0+et.attribute.width/2:Ht/2),ge=0+(vt>et.attribute.height?et.attribute.y-0+et.attribute.height/2:vt/2),gt=new ns({x:_e-Pt/2,y:ge-Pt/2,width:Pt,height:Pt,image:iv.play.svg,cursor:iv.play.cursor});gt.name="play-icon",q.appendChild(gt),g.scenegraph.updateNextFrame()}),ht.onerror=()=>{et.image=iv.damage_pic.svg},ht.src=yt,ht.setAttribute("preload","auto");const et=iu({x:h[3],y:h[0],width:r-h[1]-h[3],height:s-h[2]-h[0],image:ht,cursor:"pointer"});return et.name="image",et.keepAspectRatio=l,et.textAlign=d,et.textBaseline=u,q.appendChild(et),q}function l9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C){var S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q;const ot=i._getCellStyle(r,s),ct=wc("padding",ot,r,s,i);z(ct)&&(d=ct),!((S=m==null?void 0:m.text)===null||S===void 0)&&S.textAlign&&(u=(_=m==null?void 0:m.text)===null||_===void 0?void 0:_.textAlign),!((y=m==null?void 0:m.text)===null||y===void 0)&&y.textBaseline&&(c=(w=m==null?void 0:m.text)===null||w===void 0?void 0:w.textBaseline);const _t=i.isAutoRowHeight(s),yt=l==="auto",ht=(A=ot.autoWrapText)!==null&&A!==void 0?A:i.internalProps.autoWrapText,et=ot.lineClamp,mt=ds(r,s,m,i);let st;if(C&&(st=i.scenegraph.getCell(r,s,!0),st&&st.role==="cell"&&st.setAttributes({x:n,y:o,width:a,height:h,lineWidth:(x=(R=m==null?void 0:m.group)===null||R===void 0?void 0:R.lineWidth)!==null&&x!==void 0?x:void 0,fill:(T=(M=m==null?void 0:m.group)===null||M===void 0?void 0:M.fill)!==null&&T!==void 0?T:void 0,stroke:(H=(B=m==null?void 0:m.group)===null||B===void 0?void 0:B.stroke)!==null&&H!==void 0?H:void 0,strokeArrayWidth:mt??void 0,strokeArrayColor:(P=(k=m==null?void 0:m.group)===null||k===void 0?void 0:k.strokeArrayColor)!==null&&P!==void 0?P:void 0,cursor:(F=(E=m==null?void 0:m.group)===null||E===void 0?void 0:E.cursor)!==null&&F!==void 0?F:void 0,lineDash:(L=(I=m==null?void 0:m.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius})),st&&st.role==="cell"||(st=new ie({x:n,y:o,width:a,height:h,lineWidth:(O=(D=m==null?void 0:m.group)===null||D===void 0?void 0:D.lineWidth)!==null&&O!==void 0?O:void 0,fill:(W=(V=m==null?void 0:m.group)===null||V===void 0?void 0:V.fill)!==null&&W!==void 0?W:void 0,stroke:($=(j=m==null?void 0:m.group)===null||j===void 0?void 0:j.stroke)!==null&&$!==void 0?$:void 0,strokeArrayWidth:mt??void 0,strokeArrayColor:(K=(X=m==null?void 0:m.group)===null||X===void 0?void 0:X.strokeArrayColor)!==null&&K!==void 0?K:void 0,cursor:(Q=(U=m==null?void 0:m.group)===null||U===void 0?void 0:U.cursor)!==null&&Q!==void 0?Q:void 0,lineDash:(pt=(dt=m==null?void 0:m.group)===null||dt===void 0?void 0:dt.lineDash)!==null&&pt!==void 0?pt:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius}),st.role="cell",st.col=r,st.row=s,e==null||e.addCellGroup(st)),f&&st.appendChild(f),p){const Ft=t;let Ht;if(g){let vt=r,Pt=s;v&&(vt=v.start.col,Pt=v.start.row),Ht=i.getCellIcons(vt,Pt)}if(S4(st,Ht,Ft,d,yt,_t,ht,typeof et=="number"?et:void 0,st.attribute.width,st.attribute.height,u,c,i,m,v),(xt=m==null?void 0:m._vtable)===null||xt===void 0?void 0:xt.marked){const vt=Gp({x:st.attribute.width,y:0,startAngle:Math.PI/2,endAngle:Math.PI,outerRadius:6,fill:"#3073F2",pickable:!1});vt.name="mark",st.appendChild(vt)}}return f&&st.setAttributes({width:Math.max(st.attribute.width,(G=f.attribute.width)!==null&&G!==void 0?G:0),height:Math.max(st.attribute.height,(q=f.attribute.height)!==null&&q!==void 0?q:0)}),st}function a9(i,t,e,n,o,r,s,l,a,h){var d,u,c,g,f,p;i.dependField&&(o=(u=(d=a.getCellOriginRecord(r,s))===null||d===void 0?void 0:d[i.dependField])!==null&&u!==void 0?u:o),i.barType=(c=i.barType)!==null&&c!==void 0?c:"default",i.min=(g=Ze(i.min,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&g!==void 0?g:0,i.max=(f=Ze(i.max,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&f!==void 0?f:i.min+100;let m=0;m=h?a.getRowsHeight(h.start.row,h.end.row):a.getRowHeight(s);let v=e,C=m,S=0;at(a.theme._contentOffset)&&(S=a.theme._contentOffset);const _=new ie({x:-S,y:-S,width:v,height:C});_.name="progress-bar";const{showBar:y,barColor:w,barBgColor:A,barPositiveColor:R,barNegativeColor:x,barAxisColor:M,barRightToLeft:T,showBarMark:B,barMarkPositiveColor:H,barMarkNegativeColor:k,barMarkWidth:P,barMarkPosition:E}=t;let{barHeight:F,barBottom:I,barPadding:L}=t;L.length===1?L=[L[0],L[0],L[0],L[0]]:L.length===2?L=[L[0],L[1],L[0],L[1]]:L.length===3&&(L=[L[0],L[1],L[2],L[1]]),L=L.map((U,Q)=>{if(typeof U=="string"&&oc.endsWith(U,"%")){const dt=Number(U.substr(0,U.length-1));return Q===0||Q===2?m*dt/100:e*dt/100}return Number(U)});const D=Yt(bt("borderLineWidth",t,r,s,a)),O=Math.max(L[0],Math.ceil(D[0]/2)),V=Math.max(L[1],Math.floor(D[1]/2)),W=Math.max(L[2],Math.floor(D[2]/2)),j=Math.max(L[3],Math.ceil(D[3]/2));v-=V+j,C-=W+O,s===a.rowCount-1&&[0,"0"].includes(I)&&(C-=1);const $=O,X=j,K=v;if(typeof F=="string"&&oc.endsWith(F,"%")?(F=Number(F.substr(0,F.length-1)),F=C*F/100):F=Number(F),typeof I=="string"&&oc.endsWith(I,"%")?(I=Number(I.substr(0,I.length-1)),I=C*I/100):I=Number(I),Ze(y,{col:r,row:s,table:a,context:null,value:n,dataValue:o})){let U=`${o}`;oc.endsWith(U,"%")&&(U=U.substr(0,U.length-1));const Q=Number(U);if(isNaN(Q))return _;if(((p=i.barType)!==null&&p!==void 0?p:"default")==="default"){const dt=Q<i.min?0:Q>i.max?1:(Q-i.min)/(i.max-i.min),pt=v,xt=$+C-F-I;let G=Math.min(pt*dt,pt);const q=T?X+K-G:X;r!==a.colCount-1||dt!==1||T||(G-=1);const ot=Ze(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:dt});if(ot){const yt=ke({x:q,y:xt,width:pt,height:F,fill:ot});_.addChild(yt)}const ct=Ze(w,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:dt})||"#20a8d8",_t=ke({x:q,y:xt,width:G,height:F,fill:ct});_.addChild(_t)}else if(i.barType==="negative"){const dt=i.min<0?-i.min:0,pt=i.max>0?i.max:0,xt=dt/(dt+pt),G=1-xt,q=Q>0?Q/pt:0,ot=Q<0?-Q/dt:0,ct=v,_t=$+C-F-I,yt=X,ht=Ze(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q});if(ht){const me=ke({x:yt,y:_t,width:ct,height:F,fill:ht});_.addChild(me)}const et=T?G*ct:xt*ct,mt=Math.min(ct*xt*ot,ct),st=T?{left:yt+et,top:_t,width:mt,height:F}:{left:yt+et-mt,top:_t,width:mt,height:F},Ft=Ze(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:ot})||"#20a8d8",Ht=ke({x:st.left,y:st.top,width:st.width,height:st.height,fill:Ft});_.addChild(Ht);let vt=Math.min(ct*G*q,ct);r!==a.colCount-1||q!==1||T||(vt-=1);const Pt=T?{left:yt+et-vt,top:_t,width:vt,height:F}:{left:yt+et,top:_t,width:vt,height:F},_e=Ze(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q})||"#20a8d8",ge=ke({x:Pt.left,y:Pt.top,width:Pt.width,height:Pt.height,fill:_e});_.addChild(ge);const gt=T?st.left:Pt.left,Le=Ze(M,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q}),Fe=un({x:0,y:0,stroke:Le,lineWidth:1,lineDash:[2,2],points:[{x:gt,y:0},{x:gt,y:m}]});if(_.addChild(Fe),B&&(q||ot)){const me=P,Ve=[];let ne;if(q>0)if(ne=Ze(H,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q})||"#20a8d8",E==="right"){const Mt=T?Pt.left+P/2:Pt.left+Pt.width-P/2;Ve.push({x:Mt,y:Pt.top}),Ve.push({x:Mt,y:Pt.top+Pt.height})}else E==="bottom"&&(Ve.push({x:Pt.left,y:Pt.top+Pt.height-P/2}),Ve.push({x:Pt.left+Pt.width,y:Pt.top+Pt.height-P/2}));else if(ot>0)if(ne=Ze(k,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:ot})||"#20a8d8",E==="right"){const Mt=T?st.left+st.width-P/2:st.left+P/2;Ve.push({x:Mt,y:st.top}),Ve.push({x:Mt,y:st.top+st.height})}else E==="bottom"&&(Ve.push({x:st.left,y:st.top+st.height-P/2}),Ve.push({x:st.left+st.width,y:st.top+st.height-P/2}));const Rt=un({x:0,y:0,stroke:ne,lineWidth:me,points:Ve});_.addChild(Rt)}}else if(i.barType==="negative_no_axis"){const dt=i.min<0?-i.min:0,pt=i.max>0?i.max:0,xt=Math.max(dt,pt),G=xt===0?0:Math.abs(Q)/xt,q=v;let ot=Math.min(q*G,q);r!==a.colCount-1||G!==1||T||(ot-=1);const ct=$+C-F-I,_t=T?X+K-ot:X,yt=Ze(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G});if(yt){const st=ke({x:_t,y:ct,width:q,height:F,fill:yt});_.addChild(st)}const ht={left:_t,top:ct,width:ot,height:F};let et;et=Q>=0?Ze(R,{col:r,row:s,table:a,context:null,value:n,percentile:G,dataValue:o})||"#20a8d8":Ze(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G})||"#20a8d8";const mt=ke({x:ht.left,y:ht.top,width:ht.width,height:ht.height,fill:et});if(_.addChild(mt),B&&Q){const st=P,Ft=[];let Ht;if(Ht=Q>=0?Ze(H,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G})||"#20a8d8":Ze(k,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G})||"#20a8d8",E==="right"){const Pt=T?ht.left+P/2:ht.left+ht.width-P/2;Ft.push({x:Pt,y:ht.top}),Ft.push({x:Pt,y:ht.top+ht.height})}else E==="bottom"&&(Ft.push({x:ht.left,y:ht.top+ht.height-P/2}),Ft.push({x:ht.left+ht.width,y:ht.top+ht.height-P/2}));const vt=un({x:0,y:0,stroke:Ht,lineWidth:st,points:Ft});_.addChild(vt)}}}return _}function h9(i,t,e,n,o,r){var s,l,a,h,d,u,c,g,f;if(e!=null&&e.zero&&(i=Math.min(i,0),t=Math.max(t,0)),e==null?void 0:e.expand){const v=i,C=t;z(e.expand.min)&&(i=v-(C-v)*e.expand.min),z(e.expand.max)&&(t=C+(C-v)*e.expand.max)}let p,m;if(at(e==null?void 0:e.min)&&(i=e.min),at(e==null?void 0:e.max)&&(t=e.max),(e==null?void 0:e.type)==="log"?(p=new Ia,p.base((s=e==null?void 0:e.base)!==null&&s!==void 0?s:10)):(e==null?void 0:e.type)==="symlog"?(p=new Da,p.constant((l=e==null?void 0:e.constant)!==null&&l!==void 0?l:10)):p=new Jr,p.domain([i,t],!!(e!=null&&e.nice)),e==null?void 0:e.nice){let v=(u=(h=(a=e.tick)===null||a===void 0?void 0:a.forceTickCount)!==null&&h!==void 0?h:(d=e.tick)===null||d===void 0?void 0:d.tickCount)!==null&&u!==void 0?u:10;oe(v)&&(v=v({axisLength:o,labelStyle:(g=(c=e==null?void 0:e.label)===null||c===void 0?void 0:c.style)!==null&&g!==void 0?g:{fontSize:yh.LABEL_FONT_SIZE}})),e.niceType==="accurateFirst"&&(v=Math.max(10,v)),Tt(e.min)&&Tt(e.max)?p.nice(v):z(e.min)&&Tt(e.max)?p.niceMax(v):Tt(e.min)&&z(e.max)&&p.niceMin(v)}return delete p._niceType,r||(m=p.ticks(at(e==null?void 0:e.tickCount)?e==null?void 0:e.tickCount:5,{noDecimals:(f=e==null?void 0:e.tick)===null||f===void 0?void 0:f.noDecimals})),{range:p.domain(),ticks:m}}const Sg=()=>{Bt.registerFunction("createChartCellGroup",ZV),Bt.registerFunction("getAxisDomainRangeAndLabels",h9)},xg=()=>{Bt.registerFunction("createCheckboxCellGroup",JV)},Rg=()=>{Bt.registerFunction("createImageCellGroup",A4)},Ag=()=>{Bt.registerFunction("createProgressBarCell",a9)},Tg=()=>{Bt.registerFunction("createRadioCellGroup",t9)},Mg=()=>{Bt.registerFunction("createSparkLineCellGroup",o9)},Al=()=>{Bt.registerFunction("createTextCellGroup",l9)},Bg=()=>{Bt.registerFunction("createVideoCellGroup",s9)};vg(),bg(),Cg(),yg(),_g(),wg(),YV(),Sg(),xg(),Rg(),Ag(),Tg(),Mg(),Al(),Bg();class d9 extends KA{}Al();class u9 extends KA{}function c9(i,t,e,n,o,r){const s=r.columnHeaderLevelCount,l=[],a=[];for(let c=0;c<e.length;c++)n.includes(e[c])||a.push(o[c]);for(let c=0;c<n.length;c++)if(!e.includes(n[c])){const g={col:i,row:s+c};l.push(g)}let h=r.getParentCellId(i,t),d=r.getRowHeaderCellAddressByCellId(h);const u=[];for(d&&u.push(d);h;)h=r.getParentCellId(d.col,d.row),h&&(d=r.getRowHeaderCellAddressByCellId(h),u.push(d));return{addCellPositions:l,removeCellPositions:a,updateCellPositions:u}}const oT={startInTotal:0,level:0};class Jo{constructor(t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y;this.colIndex=0,this._showHeader=!0,this.columnHeaderObjs=[],this.rowHeaderObjs=[],this._cornerHeaderCellFullPathIds=[],this._columnHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds_FULL=[],this._cornerHeaderCellIds=[],this._columnHeaderCellIds=[],this._rowHeaderCellIds=[],this._rowHeaderCellIds_FULL=[],this._columnWidths=[],this.columnPaths=[],this._headerObjects=[],this._headerObjectMap={},this._indicators=[],this.indicatorsAsCol=!0,this.hideIndicatorName=!1,this._showRowHeader=!0,this._showColumnHeader=!0,this._indicatorShowType="column",this.rowHierarchyTextStartAlignment=!1,this.rowDimensionKeys=[],this.colDimensionKeys=[],this.indicatorKeys=[],this.indicatorDimensionKey=ji,this._rowHeaderExtensionTree={},this._extensionRowDimensionKeys=[],this.fullRowDimensionKeys=[],this.leftRowSeriesNumberColumnCount=0,this.rightRowSeriesNumberColumnCount=0,this._useGetBodyCache=!1,this._getBodyCache=new Map,this._useHeaderPathCache=!1,this._colHeaderPathCache=new Map,this._rowHeaderPathCache=new Map,this.sharedVar=t.layoutNodeId,this._table=t,t.options.rowHierarchyType==="tree"&&(this.extensionRows=t.options.extensionRows),this.dataset=e,this._largeCellRangeCache=[],this._CellHeaderPathMap=new Map,this.rowTree=t.internalProps.rowTree,this.columnTree=t.internalProps.columnTree,this.rowsDefine=(r=t.internalProps.rows)!==null&&r!==void 0?r:[],this.columnsDefine=(s=t.internalProps.columns)!==null&&s!==void 0?s:[],this.indicatorsDefine=(l=t.internalProps.indicators)!==null&&l!==void 0?l:[],this.indicatorTitle=t.options.indicatorTitle,this.indicatorsAsCol=(a=t.options.indicatorsAsCol)===null||a===void 0||a,this.hideIndicatorName=(h=t.options.hideIndicatorName)!==null&&h!==void 0&&h,this.showRowHeader=(d=t.options.showRowHeader)===null||d===void 0||d,this.showColumnHeader=(u=t.options.showColumnHeader)===null||u===void 0||u,this.rowHeaderTitle=t.options.rowHeaderTitle,this.columnHeaderTitle=t.options.columnHeaderTitle,this.rowHierarchyType=(c=t.options.rowHierarchyType)!==null&&c!==void 0?c:"grid",this.rowExpandLevel=(g=t.options.rowExpandLevel)!==null&&g!==void 0?g:1,this.rowHierarchyIndent=(f=t.options.rowHierarchyIndent)!==null&&f!==void 0?f:20,this.rowHierarchyTextStartAlignment=t.options.rowHierarchyTextStartAlignment,this.cornerSetting=Object.assign({titleOnDimension:"column",forceShowHeader:!1},t.options.corner),e&&(this.rowTree=e.rowHeaderTree,this.columnTree=e.colHeaderTree),(p=this.indicatorsDefine)===null||p===void 0||p.forEach(x=>{typeof x=="string"?this.indicatorKeys.push(x):this.indicatorKeys.push(x.indicatorKey)}),this.columnDimensionTree=n,this.rowDimensionTree=o,this.colDimensionKeys=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this.resetRowHeaderLevelCount(),this._table.isPivotChart()&&(this.hasTwoIndicatorAxes=this.indicatorsDefine.some(x=>{var M,T;if(x.chartSpec&&x.chartSpec.series&&x.chartSpec.series.length>1){const B=(T=(M=x.chartSpec.axes)!==null&&M!==void 0?M:this._table.pivotChartAxes)!==null&&T!==void 0?T:[];if(!B.length||B.every(H=>H.orient!==(this.indicatorsAsCol?"top":"right")||H.visible!==!1))return!0}return!1})),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=$0(this._rowHeaderCellFullPathIds_FULL),t.options.rowHierarchyType==="tree"&&((m=this.extensionRows)===null||m===void 0?void 0:m.length)>=1&&(this.generateExtensionRowTree(),this.extensionRows.forEach(x=>{const M=[];x.rows.forEach(T=>{typeof T=="string"?M.push(T):M.push(T.dimensionKey)}),this._extensionRowDimensionKeys.push(M),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(M)})),this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);let w,A=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();!this.dataset||this._table.isPivotChart()||((C=(v=this.dataset.records)===null||v===void 0?void 0:v.length)!==null&&C!==void 0?C:0)!==0||this.dataset.customColTree||(A=this.columnsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol&&A.push(this.indicatorDimensionKey)),A=this.columnHeaderTitle?[""].concat(A):A;let R=[];if(this.rowHierarchyType==="tree"&&((S=this.extensionRows)===null||S===void 0?void 0:S.length)>=1){const x=[];x.push(this.rowDimensionKeys[0]),this._extensionRowDimensionKeys.forEach(M=>{x.push(M[0])}),R=this.extensionRows.reduce((M,T)=>M.concat(T.rows),[]),w=this.rowHeaderTitle?[""].concat(x):x}else w=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),!this.dataset||this._table.isPivotChart()||((y=(_=this.dataset.records)===null||_===void 0?void 0:_.length)!==null&&y!==void 0?y:0)!==0||this.dataset.customRowTree||(w=this.rowsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol||w.push(this.indicatorDimensionKey)),w=this.rowHeaderTitle?[""].concat(w):w;this.cornerHeaderObjs=this._addCornerHeaders(A,w,this.columnsDefine.concat(...this.rowsDefine,...R)),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((x,M)=>(x[M.id]=M,x),{}),this.indicatorsAsCol&&!this.hideIndicatorName?this._indicatorShowType="column":this.indicatorsAsCol||this.hideIndicatorName?this._indicatorShowType="none":this._indicatorShowType="row",this.generateCellIdsConsiderHideHeader(),this.setPagination(t.options.pagination),this._table.isPivotChart()&&(this._chartItemSpanSize=0,this._chartItemBandSize=0,this._indicators.find(x=>{var M,T,B,H,k,P,E,F;!((M=x==null?void 0:x.style)===null||M===void 0)&&M.padding&&(this._chartPadding=x.style.padding),!((T=x.chartSpec)===null||T===void 0)&&T.barWidth&&typeof x.chartSpec.barWidth=="number"&&(this._chartItemSpanSize=(B=x.chartSpec)===null||B===void 0?void 0:B.barWidth);const I=(k=(H=x.chartSpec)===null||H===void 0?void 0:H.axes)===null||k===void 0?void 0:k.find(L=>L.type==="band");return I!=null&&I.bandSize&&(this._chartItemBandSize=I==null?void 0:I.bandSize,this._chartPaddingInner=(P=it(I.paddingInner)?I.paddingInner[0]:I.paddingInner)!==null&&P!==void 0?P:0,this._chartPaddingOuter=(E=it(I.paddingOuter)?I.paddingOuter[0]:I.paddingOuter)!==null&&E!==void 0?E:0),this._chartItemSpanSize>0||((F=x.chartSpec.series)===null||F===void 0||F.find(L=>(L.barWidth&&typeof L.barWidth=="number"&&(this._chartItemSpanSize=L.barWidth),this._chartItemSpanSize>0)),!1)})),this.handleRowSeriesNumber(t.internalProps.rowSeriesNumber),this.setColumnWidths()}handleRowSeriesNumber(t){var e,n;t&&(Array.isArray(t)?this.rowSeriesNumberColumn=t.map(o=>{var r,s;return{id:"",title:o.title,define:o,cellType:(r=o.cellType)!==null&&r!==void 0?r:"text",headerType:(s=o.cellType)!==null&&s!==void 0?s:"text",width:o.width,style:o.style,format:o.format,field:o.field,icon:o.icon}}):this.rowSeriesNumberColumn=[{id:"",title:t.title,define:t,cellType:(e=t.cellType)!==null&&e!==void 0?e:"text",headerType:(n=t.cellType)!==null&&n!==void 0?n:"text",style:t.style,width:t.width,format:t.format,field:"",icon:t.icon,isChildNode:!1}],this.leftRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!0),this.rightRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!1),this.leftRowSeriesNumberColumnCount=this.leftRowSeriesNumberColumn.length,this.rightRowSeriesNumberColumnCount=this.rightRowSeriesNumberColumn.length)}_generateColHeaderIds(){var t,e,n,o,r,s,l,a;if(((t=this.columnDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1){let h=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&this.indicatorsAsCol&&this.columnDimensionTree.totalLevel<this.columnHeaderLevelCount){h=this.columnHeaderLevelCount-this.columnDimensionTree.totalLevel;for(let d=0;d<h;d++)this._columnHeaderCellFullPathIds.unshift([])}this._addHeaders(this._columnHeaderCellFullPathIds,h,this.columnDimensionTree.tree.children,[],this.columnHeaderObjs)}if(this.columnHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const h=++this.sharedVar.seqId,d=Array(this.colCount-this.rowHeaderLevelCount-this.rightFrozenColCount).fill(h);this._columnHeaderCellFullPathIds.unshift(d);const u={id:h,title:typeof this.columnHeaderTitle.title=="string"?this.columnHeaderTitle.title:this.columnsDefine.reduce((c,g)=>typeof g=="string"?c:c+(c?`/${g.title}`:`${g.title}`),""),field:void 0,headerType:(r=(o=this.columnHeaderTitle)===null||o===void 0?void 0:o.headerType)!==null&&r!==void 0?r:"text",style:(s=this.columnHeaderTitle)===null||s===void 0?void 0:s.headerStyle,define:{id:h,disableHeaderHover:!!(!((l=this.columnHeaderTitle)===null||l===void 0)&&l.disableHeaderHover),disableHeaderSelect:!!(!((a=this.columnHeaderTitle)===null||a===void 0)&&a.disableHeaderSelect)}};this.columnHeaderObjs.push(u),this._headerObjects[h]=u}}_generateRowHeaderIds(){var t,e,n,o,r,s,l,a,h,d;if(((t=this.rowDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1)if(this.rowHierarchyType==="tree")this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs);else{let u=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&!this.indicatorsAsCol&&this.rowDimensionTree.totalLevel<this.rowHeaderLevelCount){u=this.rowHeaderLevelCount-this.rowDimensionTree.totalLevel;for(let c=0;c<u;c++)this._rowHeaderCellFullPathIds_FULL.unshift([])}this._addHeaders(this._rowHeaderCellFullPathIds_FULL,u,this.rowDimensionTree.tree.children,[],this.rowHeaderObjs)}if(this.rowHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const u=++this.sharedVar.seqId,c=Array((r=(o=this._rowHeaderCellFullPathIds_FULL[0])===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:this.rowDimensionTree.tree.size).fill(u);this._rowHeaderCellFullPathIds_FULL.unshift(c);const g={id:u,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((f,p)=>typeof p=="string"?f:f+(f?`/${p.title}`:`${p.title}`),""),field:void 0,headerType:(l=(s=this.rowHeaderTitle)===null||s===void 0?void 0:s.headerType)!==null&&l!==void 0?l:"text",style:(a=this.rowHeaderTitle)===null||a===void 0?void 0:a.headerStyle,define:{id:u,disableHeaderHover:!!(!((h=this.rowHeaderTitle)===null||h===void 0)&&h.disableHeaderHover),disableHeaderSelect:!!(!((d=this.rowHeaderTitle)===null||d===void 0)&&d.disableHeaderSelect)}};this.rowHeaderObjs.push(g),this._headerObjects[u]=g}}_addHeaders(t,e,n,o,r){const s=this;t[e]||function(l){const a=t[l]=[];if(s.colIndex===0)return a;const h=t[l-1];for(let d=0;d<(h==null?void 0:h.length);d++)a[d]=h[d]}(e);for(let l=0;l<n.length;l++){const a=n[l];t8(a,t,r,o,e,this)}}_addHeadersForTreeMode(t,e,n,o,r,s,l,a){const h=this;t[e]||function(d){const u=t[d]=[];if(h.colIndex===0)return u;const c=t[d-1];for(let g=0;g<(c==null?void 0:c.length);g++)u[g]=c[g]}(e);for(let d=0;d<n.length;d++){const u=n[d];e8(u,t,a,o,e,r,s,l,this)}}_addCornerHeaders(t,e,n){var o,r;const s=[];if(this.cornerSetting.titleOnDimension==="all")if(this.indicatorsAsCol){let l=-1;t&&t.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}),e&&e.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[l]||(this._cornerHeaderCellFullPathIds[l]=[]),this._cornerHeaderCellFullPathIds[l][h]=c})}else{let l=-1;e&&e.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f;for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c}),t&&t.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h][l]=c})}else if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="column"){const l=((o=this.cornerSetting)===null||o===void 0?void 0:o.titleOnDimension)==="row"?e:t;l&&l.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};if(s[c]=f,this._headerObjects[c]=f,this.cornerSetting.titleOnDimension==="column"){this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}else if(this.cornerSetting.titleOnDimension==="row")for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c})}else{const l=++this.sharedVar.seqId,a={id:l,title:"",field:"维度名称",style:this.cornerSetting.headerStyle,headerType:(r=this.cornerSetting.headerType)!==null&&r!==void 0?r:"text",define:{dimensionKey:"维度名称",id:l,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect}};s[l]=a,this._headerObjects[l]=a;for(let h=0;h<this.columnHeaderLevelCount;h++)for(let d=0;d<this.rowHeaderLevelCount;d++)this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]),this._cornerHeaderCellFullPathIds[h][d]=l}return s}generateExtensionRowTree(){this.extensionRows.forEach((t,e)=>{const n=this._rowHeaderCellFullPathIds_FULL;this._rowHeaderCellFullPathIds_FULL=[],n.forEach((o,r)=>{const s=o[o.length-1];let l,a;if(this.colIndex=0,typeof t.rowTree=="function"){const d=this.findFullCellIds(o);l=t.rowTree(d.map(u=>({dimensionKey:this._headerObjects[u].field,value:this._headerObjects[u].title})))}else l=Pe(t.rowTree);this._rowHeaderExtensionTree[s]?(this._rowHeaderExtensionTree[s].reset(this._rowHeaderExtensionTree[s].tree.children,!0),a=this._rowHeaderExtensionTree[s]):(a=new Me(l??[],this.sharedVar,this.rowHierarchyType,void 0),this._rowHeaderExtensionTree[s]=a);const h=[];this._addHeadersForTreeMode(h,0,a.tree.children,[],a.totalLevel,!0,t.rows,this.rowHeaderObjs);for(let d=0;d<h[0].length;d++)this._rowHeaderCellFullPathIds_FULL.push(o.concat(h[0][d]))})})}setColumnWidths(){var t,e,n;const o=new Array(this.colCount).fill(void 0);if(this.leftRowSeriesNumberColumnCount&&(o[0]=this.leftRowSeriesNumberColumn[0]),this.showHeader&&this.showRowHeader)if(this.rowHeaderTitle&&(o[0+this.leftRowSeriesNumberColumnCount]={}),this.rowHierarchyType==="tree"){const r=this.rowDimensionKeys[0];if(r){const s=(t=this.rowsDefine)===null||t===void 0?void 0:t.find(l=>typeof l!="string"&&l.dimensionKey===r);s&&(o[0+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:s.width,minWidth:s.minWidth,maxWidth:s.maxWidth})}(e=this._extensionRowDimensionKeys)===null||e===void 0||e.forEach((s,l)=>{var a;const h=s[0];if(h){const d=(a=this.extensionRows[l].rows)===null||a===void 0?void 0:a.find(u=>typeof u!="string"&&u.dimensionKey===h);d&&(o[l+1+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth})}})}else(this.rowDimensionTree.totalLevel>0?this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr():this.rowsDefine.map(r=>typeof r=="string"?r:r.dimensionKey)).forEach((r,s)=>{var l;const a=(l=this.rowsDefine)===null||l===void 0?void 0:l.find(h=>typeof h!="string"&&h.dimensionKey===r);a&&(o[s+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:a.width,minWidth:a.minWidth,maxWidth:a.maxWidth})});if(this.indicatorsAsCol)for(let r=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;r<this.colCount;r++){const s=this.getBody(r,this.columnHeaderLevelCount);o[r]={width:s==null?void 0:s.width,minWidth:s==null?void 0:s.minWidth,maxWidth:s==null?void 0:s.maxWidth}}else{let r,s,l,a=0;(n=this._indicators)===null||n===void 0||n.forEach((h,d)=>{var u,c;typeof h.width=="number"?a=Math.max(h.width,a):h.width==="auto"&&(l=!0),typeof h.minWidth=="number"&&(s=Math.max(h.minWidth,(u=s)!==null&&u!==void 0?u:0)),typeof h.maxWidth=="number"&&(r=Math.min(h.maxWidth,(c=r)!==null&&c!==void 0?c:Number.MAX_VALUE))}),a=a>0?a:l?"auto":void 0,o.fill({width:a,minWidth:s,maxWidth:r},this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount,this.colCount-this.rightFrozenColCount)}this._columnWidths=o}get columnWidths(){return this._columnWidths}getColumnWidthDefined(t){return this._columnWidths[t]}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader=t}get showColumnHeader(){return this._showColumnHeader}set showColumnHeader(t){this._showColumnHeader=t}get showRowHeader(){return this._showRowHeader}set showRowHeader(t){this._showRowHeader=t}get columnHeaderTitle(){return this._columnHeaderTitle}set columnHeaderTitle(t){this._columnHeaderTitle=t}get rowHeaderTitle(){return this._rowHeaderTitle}set rowHeaderTitle(t){this._rowHeaderTitle=t}getHeaderFieldKey(t,e){}getCellLocation(t,e){return this.isCornerHeader(t,e)?"cornerHeader":this.isColumnHeader(t,e)?"columnHeader":this.isRowHeader(t,e)?"rowHeader":"body"}isHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||e>=0&&e<this.columnHeaderLevelCount||t>=this.colCount-this.rightHeaderColCount||e>=this.rowCount-this.bottomHeaderRowCount}isCornerHeader(t,e){return t>=0&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isColumnHeader(t,e){return t>=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isRowHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=this.columnHeaderLevelCount}isFrozen(t,e){return this.isFrozenColumn(t)||this.isRightFrozenColumn(t)||this.isBottomFrozenRow(e)||this.isFrozenRow(e)||this.isSeriesNumberInBody(t,e)||this.isSeriesNumberInHeader(t,e)}isFrozenColumn(t,e){if(z(e)){if(t>=0&&t<this.frozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.frozenColCount>0&&t>=0&&t<this.frozenColCount)return!0;return!1}isRightFrozenColumn(t,e){if(z(e)){if(t>=this.colCount-this.rightFrozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.rightFrozenColCount>0&&t>=this.colCount-this.rightFrozenColCount)return!0;return!1}isFrozenRow(t,e){if(z(e)){if(e>=0&&e<this.frozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.frozenRowCount>0&&e>=0&&e<this.frozenRowCount)return!0;return!1}isBottomFrozenRow(t,e){if(z(e)){if(e>=this.rowCount-this.bottomFrozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.bottomFrozenRowCount>0&&e>=this.rowCount-this.bottomFrozenRowCount)return!0;return!1}isLeftTopCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=0&&e<this.frozenRowCount}isLeftBottomCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}isRightTopCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=0&&e<this.frozenRowCount}isRightBottomCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}getColumnHeaderRange(){return{start:{col:this.rowHeaderLevelCount,row:0},end:{col:this.colCount-1,row:this.columnHeaderLevelCount-1}}}getRowHeaderRange(){return{start:{col:0,row:this.columnHeaderLevelCount},end:{col:this.rowHeaderLevelCount-1,row:this.rowCount-1}}}getCornerHeaderRange(){return{start:{col:0,row:0},end:{col:this.rowHeaderLevelCount-1,row:this.columnHeaderLevelCount-1}}}getBodyRange(){return{start:{col:this.rowHeaderLevelCount,row:this.columnHeaderLevelCount},end:{col:this.colCount-1,row:this.rowCount-1}}}resetCellIds(){}get frozenColCount(){return this._table.internalProps.frozenColCount?this.colCount>this._table.internalProps.frozenColCount?this._table.internalProps.frozenColCount:this.colCount:0}get frozenRowCount(){return this._table.internalProps.frozenRowCount?this.rowCount>=this._table.internalProps.frozenRowCount?this._table.internalProps.frozenRowCount:this.rowCount:0}get headerLevelCount(){return this.columnHeaderLevelCount}resetColumnHeaderLevelCount(){var t,e,n,o,r,s,l,a,h,d,u;if(this.showHeader&&this.showColumnHeader){if(this._table.isPivotChart()&&this.indicatorsAsCol&&!(!((e=(t=this.dataset)===null||t===void 0?void 0:t.colKeys)===null||e===void 0)&&e.length)&&((o=(n=this.columnDimensionTree)===null||n===void 0?void 0:n.tree)===null||o===void 0?void 0:o.level)===0&&!this.hasTwoIndicatorAxes)return void(this.columnHeaderLevelCount=0);let c=this.indicatorsAsCol&&this.hideIndicatorName&&this.colDimensionKeys[this.colDimensionKeys.length-1]===this.indicatorDimensionKey?this.columnDimensionTree.totalLevel-1:this.columnDimensionTree.totalLevel;return c===0&&this.dataset&&!(!((r=this.dataset.customColTree)===null||r===void 0)&&r.length)?this.cornerSetting.titleOnDimension==="row"&&this.cornerSetting.forceShowHeader?c=1:this._table.isPivotChart()||((l=(s=this.dataset.records)===null||s===void 0?void 0:s.length)!==null&&l!==void 0?l:0)!==0||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(a=this.columnsDefine.length)!==null&&a!==void 0?a:0):!this.dataset||this._table.isPivotChart()||((d=(h=this.dataset.records)===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0)!==0||this.dataset.customColTree||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(u=this.columnsDefine.length)!==null&&u!==void 0?u:0,!this.hideIndicatorName&&this.indicatorsAsCol&&c++),this.columnHeaderTitle&&(c+=1),this._table.isPivotChart()&&this.indicatorsAsCol&&!this.hasTwoIndicatorAxes&&_h(this.indicatorsDefine)&&(c-=1),void(this.columnHeaderLevelCount=c)}this.columnHeaderLevelCount=this.indicatorsAsCol?this.hideIndicatorName?0:1:0}resetRowHeaderLevelCount(){var t,e,n,o,r,s,l,a;if(this.showHeader&&this.showRowHeader){if(this.rowHierarchyType==="tree"){const u=(e=(t=this.extensionRows)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0;return this.rowHeaderTitle?void(this.rowHeaderLevelCount=2+u):void(this.rowHeaderLevelCount=1+u)}const h=this.rowDimensionTree.totalLevel;let d=h;return d===0&&this.dataset&&!(!((n=this.dataset.customRowTree)===null||n===void 0)&&n.length)?this.cornerSetting.titleOnDimension==="column"&&this.cornerSetting.forceShowHeader?d=1:this._table.isPivotChart()||((r=(o=this.dataset.records)===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:0)!==0||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=(s=this.rowsDefine.length)!==null&&s!==void 0?s:0):!this.dataset||this._table.isPivotChart()||((a=(l=this.dataset.records)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)!==0||this.dataset.customRowTree||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=this.rowsDefine.length,this.hideIndicatorName||this.indicatorsAsCol||d++),!this.indicatorsAsCol&&this.hideIndicatorName&&this.rowDimensionKeys[this.rowDimensionKeys.length-1]===this.indicatorDimensionKey&&(d=h-1),this.rowHeaderTitle&&(d+=1),void(this.rowHeaderLevelCount=d)}this.rowHeaderLevelCount=this.indicatorsAsCol||this.hideIndicatorName?0:1}get columnHeaderLevelCount(){return this._columnHeaderLevelCount}set columnHeaderLevelCount(t){this._columnHeaderLevelCount=t}get rowHeaderLevelCount(){return this._rowHeaderLevelCount}set rowHeaderLevelCount(t){this._rowHeaderLevelCount=t}get colCount(){var t;return(this.columnDimensionTree.totalLevel>0||this._table.isPivotChart()||((t=this.dataset.records)===null||t===void 0?void 0:t.length)>0||this.dataset.records&&!Array.isArray(this.dataset.records)?this.columnDimensionTree.tree.size:0)+this.rowHeaderLevelCount+this.rightHeaderColCount+this.leftRowSeriesNumberColumnCount}get rowCount(){var t,e,n,o;return((this._table.records||this.dataset.records)&&(!Array.isArray(this._table.records)||this._table.records.length>0)&&((t=this._indicators)===null||t===void 0?void 0:t.length)>0&&!(!((e=this._rowHeaderCellIds)===null||e===void 0)&&e.length)?1:(o=(n=this._rowHeaderCellIds)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)+this.columnHeaderLevelCount+this.bottomHeaderRowCount}get bodyRowSpanCount(){return this.rowDimensionTree.tree.size}get bottomFrozenRowCount(){if(!this._table.isPivotChart())return this._table.internalProps.bottomFrozenRowCount?this.rowCount-this.headerLevelCount>=this._table.internalProps.bottomFrozenRowCount?this._table.internalProps.bottomFrozenRowCount:this.rowCount-this.headerLevelCount:0;if(this.indicatorKeys.length>=1&&_h(this.indicatorsDefine)){const t=this._table.pivotChartAxes.find(e=>e.orient==="bottom");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}return 0}get rightFrozenColCount(){if(!this._table.isPivotChart())return this._table.internalProps.rightFrozenColCount?this.colCount-this.rowHeaderLevelCount>=this._table.internalProps.rightFrozenColCount?this._table.internalProps.rightFrozenColCount:this.colCount-this.rowHeaderLevelCount:0;const t=this._table.pivotChartAxes.find(e=>e.orient==="right");return(t==null?void 0:t.visible)===!1||this.indicatorsAsCol?0:this.hasTwoIndicatorAxes?1:0}get bodyRowCount(){return this.rowCount-this.bottomFrozenRowCount-this.headerLevelCount}get bodyColCount(){return this.colCount-this.rightFrozenColCount-this.rowHeaderLevelCount}get headerObjects(){return this._headerObjects}get columnObjects(){return this._indicators}getCellId(t,e){var n,o,r,s,l;if(e>=0&&t>=0){if(this.isSeriesNumber(t,e))return"";if(this.isCornerHeader(t,e))return(n=this._cornerHeaderCellIds[e])===null||n===void 0?void 0:n[t-this.leftRowSeriesNumberColumnCount];if(this.isColumnHeader(t,e))return(o=this._columnHeaderCellIds[e])===null||o===void 0?void 0:o[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount];if(this.isRowHeader(t,e))return(r=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||r===void 0?void 0:r[t-this.leftRowSeriesNumberColumnCount];if(this.isRightFrozenColumn(t,e))return(s=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||s===void 0?void 0:s[this.rowHeaderLevelCount-1];if(this.isBottomFrozenRow(t,e))return(l=this._columnHeaderCellIds[this.columnHeaderLevelCount-1])===null||l===void 0?void 0:l[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount]}}getHeader(t,e){var n;if(this.isSeriesNumberInHeader(t,e))return this.getSeriesNumberHeader(t,e);const o=this.getCellId(t,e);return(n=this._headerObjectMap[o])!==null&&n!==void 0?n:{id:void 0,field:"",headerType:"text",define:void 0}}getHeaderField(t,e){var n,o;const r=this.getCellId(t,e);return((n=this._headerObjectMap[r])===null||n===void 0?void 0:n.field)||((o=this.getBody(t,e))===null||o===void 0?void 0:o.field)}getHeaderCellAdressById(t){for(let e=0;e<this._columnHeaderCellIds.length;e++){const n=this._columnHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o+this._table.frozenColCount,row:e}}for(let e=0;e<this._rowHeaderCellIds.length;e++){const n=this._rowHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e+this._table.frozenRowCount}}for(let e=0;e<this._cornerHeaderCellIds.length;e++){const n=this._cornerHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e}}}getHeaderCellAddressByField(t){const e=this.headerObjects.find(n=>n&&n.field===t);return e&&this.getHeaderCellAdressById(e.id)}getBody(t,e){var n,o,r,s,l,a,h,d,u,c;const g=this.getBodyWidthCache(t,e);if(g)return g;if(this.isSeriesNumber(t,e)){const v=this.getSeriesNumberBody(t,e);return this.setBodyWidthCache(t,e,v),v}const f=this.getCellHeaderPaths(t,e);if(this.indicatorsAsCol){const v=(o=(n=f.colHeaderPaths)===null||n===void 0?void 0:n.find(S=>S.indicatorKey))===null||o===void 0?void 0:o.indicatorKey,C=z(v)&&(l=(s=(r=this._indicators)===null||r===void 0?void 0:r.find(S=>S.indicatorKey===v))!==null&&s!==void 0?s:this._indicators[0])!==null&&l!==void 0?l:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,C),C}const p=(h=(a=f.rowHeaderPaths)===null||a===void 0?void 0:a.find(v=>v.indicatorKey))===null||h===void 0?void 0:h.indicatorKey,m=z(p)&&(c=(u=(d=this._indicators)===null||d===void 0?void 0:d.find(v=>v.indicatorKey===p))!==null&&u!==void 0?u:this._indicators[0])!==null&&c!==void 0?c:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,m),m}getCellRange(t,e){var n,o;const r={start:{col:t,row:e},end:{col:t,row:e}};if(!this.isHeader(t,e)||t===-1||e===-1||this.isRightFrozenColumn(t,e)||this.isBottomFrozenRow(t,e))return r;if(this._table.isPivotChart()){if(this.isLeftBottomCorner(t,e))return{start:{col:0,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.frozenColCount-1,row:this.rowCount-1}};if(this.isRightTopCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:0},end:{col:this.colCount-1,row:this.frozenRowCount-1}};if(this.isRightBottomCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.colCount-1,row:this.rowCount-1}}}for(let s=0;s<this._largeCellRangeCache.length;s++){const l=this._largeCellRangeCache[s];if(t>=l.start.col&&t<=l.end.col&&e>=l.start.row&&e<=l.end.row)return l}if(this.isHeader(t,e)&&t!==-1&&e!==-1){const s=this.getCellId(t,e);for(let l=t-1;l>=0&&s===this.getCellId(l,e);l--)r.start.col=l;for(let l=t+1;l<((n=this.colCount)!==null&&n!==void 0?n:0)&&s===this.getCellId(l,e);l++)r.end.col=l;for(let l=e-1;l>=0&&s===this.getCellId(t,l);l--)r.start.row=l;for(let l=e+1;l<((o=this.rowCount)!==null&&o!==void 0?o:0)&&!(s!==this.getCellId(t,l)||this.isSeriesNumberInHeader(t,e)&&l>=this.columnHeaderLevelCount);l++)r.end.row=l}return(r.end.col-r.start.col>100||r.end.row-r.start.row>100)&&this._largeCellRangeCache.push(r),r}isCellRangeEqual(t,e,n,o){const r=this.getCellRange(t,e),s=this.getCellRange(n,o);return r.start.col===s.start.col&&r.end.col===s.end.col&&r.start.row===s.start.row&&r.end.row===s.end.row}getBodyIndexByRow(t){return t<this.columnHeaderLevelCount||t>=this.rowCount-this.bottomHeaderRowCount?-1:t-this.columnHeaderLevelCount}get bottomHeaderRowCount(){return this._table.isPivotChart()?this.bottomFrozenRowCount:0}get rightHeaderColCount(){return this._table.isPivotChart()?this.rightFrozenColCount:0}getBodyIndexByCol(t){return t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||t>=this.colCount-this.rightHeaderColCount?-1:t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount}getRecordStartRowByRecordIndex(t){return this.columnHeaderLevelCount+t}getRecordShowIndexByCell(t,e){}getCellHeaderPathsWithTreeNode(t,e){for(let l=0;l<this._largeCellRangeCache.length;l++){const a=this._largeCellRangeCache[l];if(t>=a.start.col&&t<=a.end.col&&e>=a.start.row&&e<=a.end.row)break}let n=this.getColHeaderPathCache(t,e),o=this.getRowHeaderPathCache(t,e);const r=this.getBodyIndexByCol(t),s=this.getBodyIndexByRow(e)+this.currentPageStartIndex;if(!n&&e>=0&&r>=0&&(n=this.columnDimensionTree.getTreePath(r,this.showHeader&&this.showColumnHeader?e-(this.columnHeaderTitle?1:0):this.columnDimensionTree.totalLevel),this.setColHeaderPathCache(t,e,n)),!o&&t>=0&&s>=0){if(o=[],this.rowHierarchyType==="tree"){const l=this._rowHeaderCellFullPathIds[s];let a=this.rowDimensionTree,h=0;for(;a;){const d=[];let u=l[h];for(d.push(u);;){const g=this._headerObjectMap[u];if(!(g!=null&&g.parentCellId))break;d.unshift(g.parentCellId),u=g.parentCellId}const c=a.getTreePathByCellIds(d);o.push(...c),a=this._rowHeaderExtensionTree[l[h]],h++}}else o=this.rowDimensionTree.getTreePath(s,this.showHeader&&this.showRowHeader?t-(this.rowHeaderTitle?1:0)-this.leftRowSeriesNumberColumnCount:this.rowDimensionTree.totalLevel);this.setRowHeaderPathCache(t,e,o)}return{colHeaderPaths:n,rowHeaderPaths:o,cellLocation:this.getCellLocation(t,e)}}getCellHeaderPaths(t,e){var n,o;const r=this.getCellHeaderPathsWithTreeNode(t,e),s={colHeaderPaths:[],rowHeaderPaths:[],cellLocation:r.cellLocation};return(n=r.colHeaderPaths)===null||n===void 0||n.forEach(l=>{var a,h,d;const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.colHeaderPaths.push(u)}),(o=r.rowHeaderPaths)===null||o===void 0||o.forEach(l=>{var a,h,d;if(l.dimensionKey!=="axis"){const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.rowHeaderPaths.push(u)}}),s}getIndicatorInfoByIndicatorKey(t){var e;return(e=this.indicatorsDefine)===null||e===void 0?void 0:e.find(n=>typeof n!="string"&&!!t&&n.indicatorKey===t)}findFullCellIds(t){const e=[];for(let n=0;n<t.length;n++){let o=t[n];for(e.push(o);;){const r=this._headerObjectMap[o];if(!(r!=null&&r.parentCellId))break;e.unshift(r.parentCellId),o=r.parentCellId}}return e}getHeaderDimension(t,e){var n,o,r;if(this.isHeader(t,e)){const s=this.getHeader(t,e);return(o=(n=this.rowsDefine)===null||n===void 0?void 0:n.find(l=>typeof l!="string"&&l.dimensionKey===s.field))!==null&&o!==void 0?o:(r=this.columnsDefine)===null||r===void 0?void 0:r.find(l=>typeof l!="string"&&l.dimensionKey===s.field)}}isColumnIndicatorHeader(t,e){return this._indicatorShowType==="column"&&e===this.columnHeaderLevelCount-1&&t>=this.rowHeaderLevelCount}isRowIndicatorHeader(t,e){return this._indicatorShowType==="row"&&t===this.rowHeaderLevelCount-1&&e>=this.columnHeaderLevelCount}isIndicatorHeader(t,e){return this.isColumnIndicatorHeader(t,e)||this.isRowIndicatorHeader(t,e)}toggleHierarchyState(t,e){var n,o,r,s,l,a;this.colIndex=0;const h=this._rowHeaderCellFullPathIds_FULL.slice(0),d=h.map((g,f)=>({col:t,row:f+this.columnHeaderLevelCount})),u=this.getHeader(t,e);if(u.define.hierarchyState=u.define.hierarchyState===Ot.collapse?Ot.expand:Ot.collapse,this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._rowHeaderCellFullPathIds_FULL=[],this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=[],this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs),this.rowHeaderTitle){const g=++this.sharedVar.seqId,f=Array(this.rowCount-this.columnHeaderLevelCount).fill(g);this._rowHeaderCellFullPathIds_FULL.unshift(f);const p={id:g,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((m,v)=>typeof v=="string"?m:m+(m?`/${v.title}`:`${v.title}`),""),field:void 0,headerType:(o=(n=this.rowHeaderTitle)===null||n===void 0?void 0:n.headerType)!==null&&o!==void 0?o:"text",style:(r=this.rowHeaderTitle)===null||r===void 0?void 0:r.headerStyle,define:{field:"",headerType:"text",cellType:"text",disableHeaderHover:!!(!((s=this.rowHeaderTitle)===null||s===void 0)&&s.disableHeaderHover),disableHeaderSelect:!!(!((l=this.rowHeaderTitle)===null||l===void 0)&&l.disableHeaderSelect)}};this.rowHeaderObjs.push(p),this._headerObjects[g]=p}this._rowHeaderCellFullPathIds_FULL=$0(this._rowHeaderCellFullPathIds_FULL),this.rowHierarchyType==="tree"&&((a=this.extensionRows)===null||a===void 0?void 0:a.length)>=1&&this.generateExtensionRowTree(),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((g,f)=>(g[f.id]=f,g),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0;const c=c9(t,e,h.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),this._rowHeaderCellFullPathIds_FULL.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),d,this);return this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination),c}isHeaderForColWidth(t,e){return this.isHeader(t,e)}getHeaderForColWidth(t,e){return this.getHeader(t,e)}getPivotCellAdress(t){var e;if(!Array.isArray(t))return;let n,o,r=this.rowTree,s=this.columnTree;for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1){if(((e=this==null?void 0:this.cornerSetting)===null||e===void 0?void 0:e.titleOnDimension)==="row"){let g=0;return this.rowHierarchyType==="grid"&&(g=this.rowDimensionKeys.indexOf(d.dimensionKey)),g===-1?void 0:{col:(this.rowHeaderTitle?g+1:g)+this.leftRowSeriesNumberColumnCount,row:0}}const c=this.colDimensionKeys.indexOf(d.dimensionKey);return c===-1?void 0:{col:0+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderTitle?c+1:c}}let u=!1;for(let c=0;c<s.length;c++){const g=s[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){s=g.children,o=g,u=!0;break}}if(!u)for(let c=0;c<r.length;c++){const g=r[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){r=g.children,n=g;break}}}let l=0,a=0;if(n){a=this.columnHeaderLevelCount;const{startInTotal:h,level:d}=n;return a+=h,l=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?d+1:d)+this.leftRowSeriesNumberColumnCount:0+this.leftRowSeriesNumberColumnCount,{col:l,row:a}}if(o){l=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:h,level:d}=o;return l+=h,a=this.columnHeaderTitle?d+1:d,{col:l,row:a}}}getPivotDimensionInfo(t,e){var n;const{colHeaderPaths:o,rowHeaderPaths:r}=this.getCellHeaderPaths(t,e),s=[];return o.length?o.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):r.length?r.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):this.isCornerHeader(t,e)&&(((n=this==null?void 0:this.cornerSetting)===null||n===void 0?void 0:n.titleOnDimension)==="row"?s.push({dimensionKey:this.rowDimensionKeys[(this.rowHeaderTitle?t-1:t)-this.leftRowSeriesNumberColumnCount],isPivotCorner:!0}):s.push({dimensionKey:this.colDimensionKeys[this.columnHeaderTitle?e-1:e],isPivotCorner:!0})),s}getIndicatorKey(t,e){var n;return(n=this.getBody(t,e))===null||n===void 0?void 0:n.indicatorKey}getParentCellId(t,e){if(e!==0)return this.isColumnHeader(t,e)?this.getCellId(t,e-1):this.isRowHeader(t,e)?this.getCellId(t-1,e):void 0}getRowHeaderCellAddressByCellId(t){let e,n;if(this._rowHeaderCellIds.find((o,r)=>!!o.find((s,l)=>s===t&&(e=l,!0))&&(n=r,!0)),z(e)&&z(n))return{col:e,row:n+this.columnHeaderLevelCount}}canMoveHeaderPosition(t,e){if(this.isSeriesNumberInHeader(e.col,e.row)||this.isSeriesNumberInHeader(t.col,t.row)||this.isCornerHeader(e.col,e.row)||t.col<0||t.row<0||e.col<0||e.row<0)return!1;this.isSeriesNumberInBody(e.col,e.row)&&this.isSeriesNumberInBody(t.col,t.row)&&(t.col=t.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1,e.col=e.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1);const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row))return this.getParentCellId(t.col,n.start.row)===this.getParentCellId(e.col,n.start.row);if(this.isRowHeader(t.col,t.row)){if(this.rowHierarchyType!=="tree")return this.getParentCellId(n.start.col,t.row)===this.getParentCellId(n.start.col,e.row);{const o=Pe(this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths),r=Pe(this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths);if(o.pop(),r.pop(),o.length<=r.length){if(o.length===r.length)return!o.find((s,l)=>s.dimensionKey!==r[l].dimensionKey||s.value!==r[l].value);if(o.length>0){for(let s=0;s<o.length;s++)if(o[s].startInTotal!==r[s].startInTotal)return!1}return!0}}}return!1}moveHeaderPosition(t,e){if(this.canMoveHeaderPosition(t,e)&&!this.isCellRangeEqual(t.col,t.row,e.col,e.row)){const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row)){const o=n.end.col-n.start.col+1;let r;const s=this.getCellRange(e.col,n.start.row);if(r=e.col>=t.col?s.end.col-o+1:s.start.col,r===n.start.col)return null;for(let a=0;a<this._columnHeaderCellFullPathIds.length;a++){const h=this._columnHeaderCellFullPathIds[a].splice(n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,o);h.unshift(r-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnHeaderCellFullPathIds[a],h)}const l=this._columnWidths.splice(n.start.col-this.leftRowSeriesNumberColumnCount,o);return l.unshift(r-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnWidths,l),this.columnDimensionTree.movePosition(this.getCellHeaderPathsWithTreeNode(t.col,t.row).colHeaderPaths.length-1,n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,s.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount),this.columnDimensionTree.reset(this.columnDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.col,targetIndex:r,sourceSize:o,targetSize:s.end.col-s.start.col+1,moveType:"column"}}if(this.isRowHeader(t.col,t.row)){let o;const r=this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths,s=this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths,l=r[r.length-1],a=s[r.length-1],h=l.size;if(o=e.row>=t.row?a.startInTotal+a.size-h:a.startInTotal,o===n.start.row-this.columnHeaderLevelCount)return null;const d=this._rowHeaderCellIds.splice(n.start.row-this.columnHeaderLevelCount,h);d.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellIds,d);const u=this._rowHeaderCellFullPathIds.splice(n.start.row-this.columnHeaderLevelCount,h);u.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds,u);const c=this._rowHeaderCellIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);c.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellIds_FULL,c);const g=this._rowHeaderCellFullPathIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);return g.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL,g),this.rowDimensionTree.movePosition(r.length-1,n.start.row-this.columnHeaderLevelCount,o+(e.row>t.row?l.size-1:0)),this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.row,targetIndex:o+this.columnHeaderLevelCount,sourceSize:h,targetSize:a.size,moveType:"row"}}}return null}getCellAdressByHeaderPath(t){var e,n,o,r,s,l;let a,h,d=!1,u=!1;if(Array.isArray(t)){if(t.length>this.rowDimensionKeys.length+this.colDimensionKeys.length)return;a=t.filter(y=>this.colDimensionKeys.indexOf(y.dimensionKey)>=0||this.colDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey),h=t.filter(y=>this.rowDimensionKeys.indexOf(y.dimensionKey)>=0||this.rowDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey)}else a=t.colHeaderPaths,h=t.rowHeaderPaths,(t==null?void 0:t.cellLocation)==="body"&&this._table.isPivotTable()&&(u=!0);if(!Array.isArray(a)&&!Array.isArray(h))return;if(a==null||a.sort((y,w)=>{var A,R;return this.colDimensionKeys.indexOf((A=y.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)-this.colDimensionKeys.indexOf((R=w.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)}),h==null||h.sort((y,w)=>{var A,R;return this.fullRowDimensionKeys.indexOf((A=y.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)-this.fullRowDimensionKeys.indexOf((R=w.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)}),a==null||a.forEach(y=>{y.isPivotCorner&&(d=!0)}),h==null||h.forEach(y=>{y.isPivotCorner&&(d=!0)}),d){if(this.cornerSetting.titleOnDimension==="all"&&this.indicatorsAsCol&&a.length===0){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((e=h[0])===null||e===void 0?void 0:e.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderLevelCount-1}}else if(this.cornerSetting.titleOnDimension!=="all"||this.indicatorsAsCol||h.length!==0){if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="all"&&!this.indicatorsAsCol){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((o=h[0])===null||o===void 0?void 0:o.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:0}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((r=a[0])===null||r===void 0?void 0:r.dimensionKey)===this.colDimensionKeys[y])return{col:0,row:y}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((n=a[0])===null||n===void 0?void 0:n.dimensionKey)===this.colDimensionKeys[y])return{col:this.rowHeaderLevelCount-1,row:y}}let c,g,f,p,m=!1;(a==null?void 0:a.length)>=1&&(h==null?void 0:h.length)>=1&&(m=!0);let v,C,S=this.rowTree,_=this.columnTree;if(a)for(let y=0;y<a.length;y++){const w=a[y];for(let A=0;A<_.length;A++){const R=_[A];if(!z(w.indicatorKey)&&R.dimensionKey===w.dimensionKey&&R.value===w.value||z(w.indicatorKey)&&R.indicatorKey===w.indicatorKey){_=R.children,m&&!_?C=R:m||(C=R);break}}}if((h==null?void 0:h.length)>=1)if(this.rowHierarchyType==="tree"){const y=h[h.length-1],w=this.headerObjects.filter(R=>((R==null?void 0:R.field)===y.dimensionKey||(R==null?void 0:R.field)===y.indicatorKey)&&(R==null?void 0:R.title)===y.value).map(R=>R.id),A=this._rowHeaderCellIds.filter(R=>w.indexOf(R[R.length-1])>=0).find(R=>{const x=this.findFullCellIds(R);return x.length===h.length&&x.every(M=>{const T=this._headerObjectMap[M];return h.find(B=>B.dimensionKey===T.field&&B.value===T.title)})});g=this._rowHeaderCellIds.indexOf(A)+this.columnHeaderLevelCount}else for(let y=0;y<h.length;y++){const w=h[y];for(let A=0;A<S.length;A++){const R=S[A];if(!z(w.indicatorKey)&&R.dimensionKey===w.dimensionKey&&R.value===w.value||z(w.indicatorKey)&&R.indicatorKey===w.indicatorKey&&(!z(w.value)||R.value===w.value)){S=R.children,(!m||S&&!S.some(x=>x.dimensionKey==="axis"))&&m||(v=R);break}}}if(u||!m||(v||z(g))&&C){if(v||u){g=this.columnHeaderLevelCount;const{startInTotal:y,level:w}=(s=v)!==null&&s!==void 0?s:oT;g+=y??0,f=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?w+1:w)+this.leftRowSeriesNumberColumnCount:0}if(C||u){c=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:y,level:w}=(l=C)!==null&&l!==void 0?l:oT;c+=y??0,p=this.columnHeaderTitle?w+1:w}return z(c)||z(g)?{col:c??f,row:g??p}:void 0}}setChartInstance(t,e,n){var o,r,s,l;const a=this.getCellHeaderPaths(t,e);let h;if(this.indicatorsAsCol){const d=(o=a.colHeaderPaths.find(u=>u.indicatorKey))===null||o===void 0?void 0:o.indicatorKey;h=(r=this._indicators)===null||r===void 0?void 0:r.find(u=>u.indicatorKey===d)}else{const d=(s=a.rowHeaderPaths.find(u=>u.indicatorKey))===null||s===void 0?void 0:s.indicatorKey;h=(l=this._indicators)===null||l===void 0?void 0:l.find(u=>u.indicatorKey===d)}typeof(h==null?void 0:h.chartSpec)!="function"&&h&&(h.chartInstance=n)}getChartInstance(t,e){var n,o,r,s;const l=this.getCellHeaderPaths(t,e);let a;if(this.indicatorsAsCol){const h=(n=l.colHeaderPaths.find(d=>d.indicatorKey))===null||n===void 0?void 0:n.indicatorKey;a=(o=this._indicators)===null||o===void 0?void 0:o.find(d=>d.indicatorKey===h)}else{const h=(r=l.rowHeaderPaths.find(d=>d.indicatorKey))===null||r===void 0?void 0:r.indicatorKey;a=(s=this._indicators)===null||s===void 0?void 0:s.find(d=>d.indicatorKey===h)}return a==null?void 0:a.chartInstance}checkHasChart(){return $A(this)}getDimension(t,e){var n,o;return e==="column"?(n=this.columnsDefine)===null||n===void 0?void 0:n.find(r=>typeof r!="string"&&r.dimensionKey===t):e==="row"?(o=this.rowsDefine)===null||o===void 0?void 0:o.find(r=>typeof r!="string"&&r.dimensionKey===t):void 0}getAxisConfigInPivotChart(t,e){if((this.isFrozenColumn(t,e)||this.isRightFrozenColumn(t,e))&&_l(t,e,"row",this)||(this.isFrozenRow(t,e)||this.isBottomFrozenRow(t,e))&&_l(t,e,"col",this))return Bt.getFunction("getAxisConfigInPivotChart")(t,e,this)}isEmpty(t,e){return!!this._table.isPivotChart()&&(!!this.isLeftBottomCorner(t,e)||!!this.isRightBottomCorner(t,e)||!!this.isRightTopCorner(t,e))}isAxisCell(t,e){return this._table.isPivotChart()?!!(this.indicatorKeys.length>=1&&_h(this.indicatorsDefine)&&(this.isBottomFrozenRow(t,e)&&_l(t,e,"col",this)||this.isRightFrozenColumn(t,e)&&_l(t,e,"row",this)||this.isRowHeader(t,e)&&t===this.rowHeaderLevelCount-1&&_l(t,e,"row",this)||this.hasTwoIndicatorAxes&&this.indicatorsAsCol&&e===this.columnHeaderLevelCount-1&&_l(t,e,"col",this))):!1}getChartAxes(t,e){if($8(t,e,this)||this.isAxisCell(t,e))return U8(t,e,this)}getRawChartSpec(t,e){return N8(t,e,this)}getChartSpec(t,e){return G8(t,e,this)}isShareChartSpec(t,e){return V8(t,e,this)}getChartDataId(t,e){return jA(t,e,this)}isNoChartDataRenderNothing(t,e){return j8(t,e,this)}setPagination(t){var e,n,o,r,s,l,a;if(this.clearCellRangeMap(),this._table.internalProps.useOneRowHeightFillAll=!1,this.pagination=t,this.rowHierarchyType==="grid"&&z((e=this.pagination)===null||e===void 0?void 0:e.perPageCount)&&z((n=this.pagination)===null||n===void 0?void 0:n.currentPage)){this.indicatorsAsCol===!1&&(this.pagination.perPageCount=Math.ceil(this.pagination.perPageCount/this.indicatorKeys.length)*this.indicatorKeys.length);const{perPageCount:h,currentPage:d}=this.pagination;this.currentPageStartIndex=h*(d||0),this.currentPageEndIndex=this.currentPageStartIndex+h,this._rowHeaderCellIds=(o=this._rowHeaderCellIds_FULL)===null||o===void 0?void 0:o.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(r=this._rowHeaderCellFullPathIds_FULL)===null||r===void 0?void 0:r.slice(this.currentPageStartIndex,this.currentPageEndIndex)}else this.currentPageStartIndex=0,this.currentPageEndIndex=this._rowHeaderCellIds_FULL.length,this._rowHeaderCellIds=(s=this._rowHeaderCellIds_FULL)===null||s===void 0?void 0:s.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(l=this._rowHeaderCellFullPathIds_FULL)===null||l===void 0?void 0:l.slice(this.currentPageStartIndex,this.currentPageEndIndex);this.pagination&&(this.pagination.totalCount=(a=this._rowHeaderCellIds_FULL)===null||a===void 0?void 0:a.length)}release(){var t;const e=this._table._getActiveChartInstance();e==null||e.release(),(t=this._indicators)===null||t===void 0||t.forEach(n=>{var o;(o=n.chartInstance)===null||o===void 0||o.release()})}getHeadNode(t,e){var n,o,r;let s;const l=this.getCellHeaderPaths(t,e);return l.rowHeaderPaths&&((o=(n=l.rowHeaderPaths)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0?s=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.slice(0,l.rowHeaderPaths.length):l.colHeaderPaths&&l.colHeaderPaths.length>0&&(s=l.colHeaderPaths.slice(0,l.colHeaderPaths.length)),this.getHeadNodeByRowOrColDimensions(s,t,e)}getHeadNodeByRowOrColDimensions(t,e,n){var o;if(!Array.isArray(t))return;let r,s,l=this.rowTree,a=this.columnTree;if(z(n)&&z(e)&&this.rowHierarchyType==="tree"&&this.extensionRows&&e>=1+this.leftRowSeriesNumberColumnCount){const h=this.getCellId(e-1,n);l=this._rowHeaderExtensionTree[h].tree.children}for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1)return;let u=!1;for(let c=0;c<a.length;c++){const g=a[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){a=g.children,s=g,u=!0;break}}if(!u)for(let c=0;(o=c<(l==null?void 0:l.length))!==null&&o!==void 0&&o;c++){const g=l[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){l=g.children,r=g;break}}}return r||s||void 0}clearCellRangeMap(){this._largeCellRangeCache.length=0,this._CellHeaderPathMap=new Map}getDimensionKeyInChartSpec(t,e){var n,o,r,s,l,a;let h;if(this.indicatorsAsCol===!1)for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(n=u.xField)!==null&&n!==void 0?n:(r=(o=u==null?void 0:u.series)===null||o===void 0?void 0:o[0])===null||r===void 0?void 0:r.xField,h))return h}else for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(s=u.yField)!==null&&s!==void 0?s:(a=(l=u==null?void 0:u.series)===null||l===void 0?void 0:l[0])===null||a===void 0?void 0:a.yField,h))return h}return null}_generateChartState(){return{vtable_selected:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}},vtable_selected_reverse:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}}}}updateDataStateToChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();this._indicators.forEach(o=>{var r;const s=o.chartInstance;((r=o.chartSpec.select)===null||r===void 0?void 0:r.enable)!==!1&&s.updateState(n)}),t==null||t.updateState(n)}}updateDataStateToActiveChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();t==null||t.updateState(n)}}getIndicatorKeyInChartSpec(t,e){const n=this.getRawChartSpec(t,e),o=[];if(n){if(n.series||n.xField||n.yField)return this.indicatorsAsCol===!1?n.series?n.series.forEach(r=>{const s=r.yField;o.push(s)}):o.push(n.yField):n.series?n.series.forEach(r=>{const s=r.xField;o.push(s)}):o.push(n.xField),o;if(n.valueField&&o.push(n.valueField),o.length>=1)return o}return null}getOptimunHeightForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(this.rowHeaderLevelCount,t).rowHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="yField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=rT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=Yt((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[0]+d[2]}getOptimunWidthForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(t,this.columnHeaderLevelCount).colHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="xField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=rT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=Yt((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[1]+d[3]}get leftAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="left");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}get topAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="top");return(t==null?void 0:t.visible)===!1?0:this.indicatorsAsCol&&this.hasTwoIndicatorAxes?1:0}get rightAxesCount(){return this.rightFrozenColCount}get bottomAxesCount(){return this.bottomFrozenRowCount}getColKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.colHeaderPaths.length&&n.colHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getRowKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.rowHeaderPaths.length&&n.rowHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getIndicatorInfo(t,e=""){var n;return(n=this.indicatorsDefine)===null||n===void 0?void 0:n.find(o=>typeof o!="string"&&(t?o.indicatorKey===t:!!e&&o.title===e))}getLayoutColumnTree(){const t=[],e=this.columnDimensionTree.tree.children;return Um(t,e),t}getLayoutRowTree(){const t=[],e=this.rowDimensionTree.tree.children;return Um(t,e),t}getLayoutColumnTreeCount(){const t=this.columnDimensionTree.tree.children;return lg(t,this.rowHierarchyType==="tree")}getLayoutRowTreeCount(){var t;const e=this.rowDimensionTree.tree.children;let n=lg(e,this.rowHierarchyType==="tree");return(t=this.extensionRows)===null||t===void 0||t.forEach(o=>{if(typeof o.rowTree!="function"){const r=lg(o.rowTree,!0);n*=r}}),n}resetHeaderTree(){var t,e,n;this.colIndex=0,this._rowHeaderCellFullPathIds_FULL=[],this._columnHeaderCellFullPathIds=[],this._columnHeaderCellIds=[];const o=this.dataset;this.rowTree=o.rowHeaderTree,this.columnTree=o.colHeaderTree;const r=this.rowDimensionTree.tree.children;(t=this.rowTree)===null||t===void 0||t.forEach((s,l)=>{const a=r.find(h=>h.dimensionKey===s.dimensionKey&&h.value===s.value);a&&this._table._syncHierarchyState(a,s)}),this.columnDimensionTree=new Me((e=this.columnTree)!==null&&e!==void 0?e:[],this.sharedVar),this.rowDimensionTree=new Me((n=this.rowTree)!==null&&n!==void 0?n:[],this.sharedVar,this.rowHierarchyType,this.rowHierarchyType==="tree"?this.rowExpandLevel:void 0),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=$0(this._rowHeaderCellFullPathIds_FULL),this._headerObjectMap=this._headerObjects.reduce((s,l)=>(s[l.id]=l,s),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination)}isSeriesNumberInHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount}isSeriesNumberInBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount}isSeriesNumber(t,e){return!!(z(t)&&z(e)&&(this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount))}getSeriesNumberHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount?Object.assign({},this.leftRowSeriesNumberColumn[t],{style:this._table.internalProps.rowSeriesNumber.headerStyle}):this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount&&e<this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}getSeriesNumberBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.leftRowSeriesNumberColumn[t]:this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}changeTreeNodeTitle(t,e,n){this.getHeadNode(t,e).value=n;const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}changeCornerTitle(t,e,n){if(this.isCornerHeader(t,e)){const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}}generateCellIdsConsiderHideHeader(){if(this._columnHeaderCellIds=this._columnHeaderCellFullPathIds.slice(),!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(ji),e=this._columnHeaderCellIds.splice(t,1);this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length),this._columnHeaderCellIds.push(e[0])}else this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length);if(this._rowHeaderCellIds_FULL=this._rowHeaderCellFullPathIds_FULL.slice(),!this.showRowHeader)if(this.indicatorsAsCol||this.hideIndicatorName)this._rowHeaderCellIds_FULL.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._rowHeaderCellIds_FULL[e]=n});else{const t=this.rowDimensionKeys.indexOf(ji);this._rowHeaderCellIds_FULL.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._rowHeaderCellIds_FULL[n]=o})}if(this._rowHeaderCellIds=this._rowHeaderCellIds_FULL.slice(),this._cornerHeaderCellIds=this._cornerHeaderCellFullPathIds.slice(),this.rowHeaderLevelCount===0||this.columnHeaderLevelCount===0)this._cornerHeaderCellIds=[];else if(this.cornerSetting.titleOnDimension!=="row"||this.showRowHeader){if(this.cornerSetting.titleOnDimension==="column"&&!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(ji),e=this._cornerHeaderCellIds.splice(t,1);this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length),this._cornerHeaderCellIds.push(e[0])}else this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length)}else if(this.indicatorsAsCol||this.hideIndicatorName)this._cornerHeaderCellIds.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._cornerHeaderCellIds[e]=n});else{const t=this.rowDimensionKeys.indexOf(ji);this._cornerHeaderCellIds.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._cornerHeaderCellIds[n]=o})}}enableUseGetBodyCache(){this._useGetBodyCache=!0,this._getBodyCache.clear()}disableUseGetBodyCache(){this._useGetBodyCache=!1,this._getBodyCache.clear()}enableUseHeaderPathCache(){this._useHeaderPathCache=!0,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}disableUseHeaderPathCache(){this._useHeaderPathCache=!1,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}getBodyWidthCache(t,e){if(this._useGetBodyCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e))return this.indicatorsAsCol&&this._getBodyCache.has(t)?this._getBodyCache.get(t):!this.indicatorsAsCol&&this._getBodyCache.has(e)?this._getBodyCache.get(e):void 0}setBodyWidthCache(t,e,n){!this._useGetBodyCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||(this.indicatorsAsCol?this._getBodyCache.set(t,n):this._getBodyCache.set(e,n))}getColHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._colHeaderPathCache.has(t))return this._colHeaderPathCache.get(t)}setColHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._colHeaderPathCache.set(t,n)}getRowHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._rowHeaderPathCache.has(e))return this._rowHeaderPathCache.get(e)}setRowHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._rowHeaderPathCache.set(e,n)}}function rT(i,t,e,n){e===1&&(e=0);const o=g9(i,e,n),r=t/(1-e);return Math.ceil(o*r)}function g9(i,t,e){let n;return n=i===1?i+2*e:i-t+2*e,i?n>0?n:1:0}class nv{constructor(t,e){this.tree={},this.beforeChangedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.dataConfig=t,e&&(this.records=e,typeof window<"u"&&window.performance.now(),this.setRecords(e),typeof window<"u"&&window.performance.now())}changeDataConfig(t){this.dataConfig=t}setRecords(t){this.processRecords()}processRecords(){for(let t=0,e=this.records.length;t<e;t++){const n=this.records[t];this.processRecord(n)}}processRecord(t){var e;const n=[],o=[];for(let r=0,s=this.dataConfig.rows.length;r<s;r++){const l=this.dataConfig.rows[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&o.push(t[l])}for(let r=0,s=this.dataConfig.columns.length;r<s;r++){const l=this.dataConfig.columns[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&n.push(t[l])}(e=this.dataConfig.indicators)===null||e===void 0||e.forEach(r=>{const s=t[r];s!==void 0&&(this.dataConfig.indicatorsAsCol?n.push(r):o.push(r));const l=o.join(this.stringJoinChar),a=n.join(this.stringJoinChar);o.length!==0&&(this.rowFlatKeys[l]||(this.rowFlatKeys[l]=1)),n.length!==0&&(this.colFlatKeys[a]||(this.colFlatKeys[a]=1)),n.length===0&&o.length===0||(this.tree[l]||(this.tree[l]={}),s!==void 0&&(this.tree[l][a]={value:s,record:t},this.dataConfig.indicatorsAsCol?n.pop():o.pop()))})}getTreeNode(t=[],e=[],n,o=!0){var r,s,l,a;let h,d;if(typeof t=="string")h=t;else{let u=!1;t.map((c,g)=>{c===n&&(t.splice(g,1),u=!0)}),u&&t.push(n),h=t.join(this.stringJoinChar)}if(typeof e=="string")d=e;else{let u=!1;e.map((c,g)=>{c===n&&(e.splice(g,1),u=!0)}),u&&e.push(n),d=e.join(this.stringJoinChar)}return o?(l=(s=(r=this.tree)===null||r===void 0?void 0:r[h])===null||s===void 0?void 0:s[d])!==null&&l!==void 0?l:void 0:z((a=this.beforeChangedTree[h])===null||a===void 0?void 0:a[d])?{value:this.beforeChangedTree[h][d].value,record:this.beforeChangedTree[h][d].record}:void 0}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l,a,h,d,u;let c,g;if(typeof t=="string")c=t;else{let m=!1;t.map((v,C)=>{v===n&&(t.splice(C,1),m=!0)}),m&&t.push(n),c=t.join(this.stringJoinChar)}if(typeof e=="string")g=e;else{let m=!1;e.map((v,C)=>{v===n&&(e.splice(C,1),m=!0)}),m&&e.push(n),g=e.join(this.stringJoinChar)}const f=(s=(r=this.tree[c])===null||r===void 0?void 0:r[g])===null||s===void 0?void 0:s.value,p=Object.assign({},(a=(l=this.tree[c])===null||l===void 0?void 0:l[g])===null||a===void 0?void 0:a.record);!((d=(h=this.tree[c])===null||h===void 0?void 0:h[g])===null||d===void 0)&&d.record?(this.tree[c][g].record[n]=o,this.tree[c][g].value=o):(this.tree[c]||(this.tree[c]={}),this.tree[c][g]={record:this._buildRecord(t,e,n,o),value:o}),!((u=this.beforeChangedTree[c])===null||u===void 0)&&u[g]||(this.beforeChangedTree[c]={},this.beforeChangedTree[c][g]={record:void 0,value:void 0},this.beforeChangedTree[c][g].record=p,this.beforeChangedTree[c][g].value=f)}_buildRecord(t=[],e=[],n,o){const r={},s=this.dataConfig.rows,l=this.dataConfig.columns;return s.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=t[h])}),l.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=e[h])}),r[n]=o,this.records.push(r),r}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}this.records.push(t)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.dataConfig.indicators.length;r++)this.dataConfig.indicators[r]===t&&(o=!0);if(!o){for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}}function sT(i,t){let e="";for(let n=0;n<i.length;n++)e+=i[n],n!==i.length-1&&(e+=t);return e}class xh{constructor(t,e,n,o,r,s,l,a,h,d,u,c,g){var f,p,m,v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q,ot;this.tree={},this.changedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.colKeys_normal=[],this.rowKeys_normal=[],this.rowOrder="key_a_to_z",this.colOrder="key_a_to_z",this.sorted=!1,this.indicatorStatistics=[],this.aggregators={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.registerAggregators(),this.dataConfig=t,this.filterRules=(f=this.dataConfig)===null||f===void 0?void 0:f.filterRules,this.rowHierarchyType=a??"grid",this.sortRules=(p=this.dataConfig)===null||p===void 0?void 0:p.sortRules,this.aggregationRules=(m=this.dataConfig)===null||m===void 0?void 0:m.aggregationRules,this.derivedFieldRules=(v=this.dataConfig)===null||v===void 0?void 0:v.derivedFieldRules,this.mappingRules=(C=this.dataConfig)===null||C===void 0?void 0:C.mappingRules,this.calculatedFieldRules=(S=this.dataConfig)===null||S===void 0?void 0:S.calculatedFieldRules,this.calculatedFiledKeys=(y=(_=this.calculatedFieldRules)===null||_===void 0?void 0:_.map(ct=>ct.key))!==null&&y!==void 0?y:[],this.calculatedFieldDependIndicatorKeys=(A=(w=this.calculatedFieldRules)===null||w===void 0?void 0:w.reduce((ct,_t)=>{for(let yt=0;yt<_t.dependIndicatorKeys.length;yt++)ct.indexOf(_t.dependIndicatorKeys[yt])===-1&&ct.push(_t.dependIndicatorKeys[yt]);return ct},[]))!==null&&A!==void 0?A:[],this.totals=(R=this.dataConfig)===null||R===void 0?void 0:R.totals,this.rows=e,this.columns=n,this.indicatorKeys=o,this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys=[...o];for(let ct=0;ct<this.calculatedFieldDependIndicatorKeys.length;ct++)this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.indexOf(this.calculatedFieldDependIndicatorKeys[ct])===-1&&this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.push(this.calculatedFieldDependIndicatorKeys[ct]);if(this.indicatorsAsCol=s,this.indicators=r,this.customColTree=h,this.customRowTree=d,this.hasExtensionRowTree=c,this.parseCustomTreeToMatchRecords=g,this.parseCustomTreeToMatchRecords&&(this.customColTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customColTree,"col"),this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))),this.colGrandTotalLabel=(T=(M=(x=this.totals)===null||x===void 0?void 0:x.column)===null||M===void 0?void 0:M.grandTotalLabel)!==null&&T!==void 0?T:"总计",this.colSubTotalLabel=(k=(H=(B=this.totals)===null||B===void 0?void 0:B.column)===null||H===void 0?void 0:H.subTotalLabel)!==null&&k!==void 0?k:"小计",this.rowGrandTotalLabel=(F=(E=(P=this.totals)===null||P===void 0?void 0:P.row)===null||E===void 0?void 0:E.grandTotalLabel)!==null&&F!==void 0?F:"总计",this.rowSubTotalLabel=(D=(L=(I=this.totals)===null||I===void 0?void 0:I.row)===null||L===void 0?void 0:L.subTotalLabel)!==null&&D!==void 0?D:"小计",this.collectValuesBy=(O=this.dataConfig)===null||O===void 0?void 0:O.collectValuesBy,this.needSplitPositiveAndNegative=u!=null&&u,this.rowsIsTotal=new Array((W=(V=this.rows)===null||V===void 0?void 0:V.length)!==null&&W!==void 0?W:0).fill(!1),this.colsIsTotal=new Array(($=(j=this.columns)===null||j===void 0?void 0:j.length)!==null&&$!==void 0?$:0).fill(!1),((X=this.totals)===null||X===void 0?void 0:X.row)&&this.totals.row.showSubTotals!==!1&&this.totals.row.subTotalsDimensions)for(let ct=0,_t=(dt=(Q=(U=(K=this.totals)===null||K===void 0?void 0:K.row)===null||U===void 0?void 0:U.subTotalsDimensions)===null||Q===void 0?void 0:Q.length)!==null&&dt!==void 0?dt:0;ct<_t;ct++){const yt=this.totals.row.subTotalsDimensions[ct],ht=this.rows.indexOf(yt);this.rowsIsTotal[ht]=!0}if(!((pt=this.totals)===null||pt===void 0)&&pt.column&&this.totals.column.showSubTotals!==!1&&this.totals.column.subTotalsDimensions)for(let ct=0,_t=(ot=(q=(G=(xt=this.totals)===null||xt===void 0?void 0:xt.column)===null||G===void 0?void 0:G.subTotalsDimensions)===null||q===void 0?void 0:q.length)!==null&&ot!==void 0?ot:0;ct<_t;ct++){const yt=this.totals.column.subTotalsDimensions[ct],ht=this.columns.indexOf(yt);this.colsIsTotal[ht]=!0}this.setRecords(l)}setRecords(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_;this.records=t,this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.tree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.rowsHasValue=[],this.columnsHasValue=[],t&&(this.records=t,typeof window<"u"&&window.performance.now(),this.processRecords(),this.processCollectedValuesWithSumBy(),this.generateCollectedValuesSortRule(),this.processCollectedValuesWithSortBy(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.totalStatistics(),typeof window<"u"&&window.performance.now(),this.rowKeys_normal=this.rowKeys.slice(),this.colKeys_normal=this.colKeys.slice(),typeof window<"u"&&window.performance.now(),this.sortKeys(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.customRowTree?this.rowHeaderTree=this.customRowTree:this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((y,w)=>this.rowsHasValue[w]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((y,w)=>this.rowsHasValue[w]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u),this.customColTree?this.colHeaderTree=this.customColTree:this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((y,w)=>this.columnsHasValue[w]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(S=(C=(v=this.totals)===null||v===void 0?void 0:v.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&S!==void 0&&S),typeof window<"u"&&window.performance.now(),!((_=this.dataConfig)===null||_===void 0)&&_.isPivotChart&&this.cacheDeminsionCollectedValues())}registerAggregator(t,e){this.aggregators[t]=e}registerAggregators(){this.registerAggregator(It.RECORD,hx),this.registerAggregator(It.SUM,ux),this.registerAggregator(It.COUNT,cx),this.registerAggregator(It.MAX,fx),this.registerAggregator(It.MIN,px),this.registerAggregator(It.AVG,gx),this.registerAggregator(It.NONE,dx),this.registerAggregator(It.RECALCULATE,wW)}processCollectedValuesWithSumBy(){var t,e,n,o,r,s;for(const l in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[l])===null||e===void 0)&&e.sumBy)for(const a in this.collectedValues[l]){let h;((n=this.collectValuesBy[l])===null||n===void 0?void 0:n.extendRange)==="sum"?(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>g+f.value(),0),h+=Math.round(h/20)):(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()>g?f.value():g,Number.MIN_SAFE_INTEGER),((o=this.collectValuesBy[l])===null||o===void 0?void 0:o.extendRange)==="max"?h+=Math.round(h/20):typeof((r=this.collectValuesBy[l])===null||r===void 0?void 0:r.extendRange)=="number"&&(h=Math.max(h,(s=this.collectValuesBy[l])===null||s===void 0?void 0:s.extendRange)));const d=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()<g?f.value():g,Number.MAX_SAFE_INTEGER);let u,c;this.needSplitPositiveAndNegative&&(u=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.positiveValue()>g?f.positiveValue():g,Number.MIN_SAFE_INTEGER),c=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.negativeValue()<g?f.negativeValue():g,Number.MAX_SAFE_INTEGER)),this.collectedValues[l][a]={},this.collectedValues[l][a].max=h,this.collectedValues[l][a].min=d,this.needSplitPositiveAndNegative&&(this.collectedValues[l][a].positiveMax=u,this.collectedValues[l][a].negativeMin=c)}}processCollectedValuesWithSortBy(){var t,e;const n=this;for(const o in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[o])===null||e===void 0)&&e.sortBy)for(const r in this.collectedValues[o])this.collectedValues[o][r]=this.collectedValues[o][r].sort((s,l)=>{var a,h,d,u;return((h=(a=n.collectValuesBy[o].sortBy)===null||a===void 0?void 0:a.indexOf(s))!==null&&h!==void 0?h:-1)-((u=(d=n.collectValuesBy[o].sortBy)===null||d===void 0?void 0:d.indexOf(l))!==null&&u!==void 0?u:-1)})}generateCollectedValuesSortRule(){for(const t in this.collectedValues)if(this.collectValuesBy&&this.collectValuesBy[t]&&!this.collectValuesBy[t].sortBy){let e=[];for(const n in this.collectedValues[t])Array.isArray(this.collectedValues[t][n])&&(e.push(...this.collectedValues[t][n]),e=Array.from(new Set(e)));e.length>0&&(this.collectValuesBy[t].sortBy=e)}}processRecords(){var t,e;let n=!1;if(((e=(t=this.filterRules)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0)>=1&&(n=!0),Array.isArray(this.records)){this.filteredRecords||(this.filteredRecords=[]);for(let o=0,r=this.records.length;o<r;o++){const s=this.records[o];n&&!this.filterRecord(s)||(this.filteredRecords.push(s),this.processRecord(s))}}else{this.filteredRecords||(this.filteredRecords={});for(const o in this.records)for(let r=0,s=this.records[o].length;r<s;r++){const l=this.records[o][r];n&&!this.filterRecord(l)||(this.filteredRecords[o]||(this.filteredRecords[o]=[]),this.filteredRecords[o].push(l),this.processRecord(l,o))}}this.rowFlatKeys={},this.colFlatKeys={}}filterRecord(t){var e,n;let o=!0;if(this.filterRules)for(let r=0;r<this.filterRules.length;r++){const s=this.filterRules[r];if(s.filterKey){const l=t[s.filterKey];if(((e=s.filteredValues)===null||e===void 0?void 0:e.indexOf(l))===-1){o=!1;break}}else if(!(!((n=s.filterFunc)===null||n===void 0)&&n.call(s,t))){o=!1;break}}return o}processRecord(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q,ot,ct,_t,yt,ht,et,mt,st,Ft,Ht,vt,Pt,_e,ge,gt,Le,Fe;(n=this.derivedFieldRules)===null||n===void 0||n.forEach((Rt,Mt)=>{Rt.fieldName&&Rt.derivedFunc&&(t[Rt.fieldName]=Rt.derivedFunc(t))});for(const Rt in this.collectValuesBy)if(z(t[Rt])){this.collectedValues[Rt]||(this.collectedValues[Rt]={});const Mt=this.collectValuesBy[Rt].by.map(Vt=>t[Vt]).join(this.stringJoinChar);if(this.collectedValues[Rt][Mt]||(this.collectValuesBy[Rt].sumBy?this.collectedValues[Rt][Mt]={}:this.collectValuesBy[Rt].range?this.collectedValues[Rt][Mt]={min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER}:this.collectedValues[Rt][Mt]=[]),this.collectValuesBy[Rt].sumBy){const Vt=this.collectValuesBy[Rt].sumBy.map(Xt=>t[Xt]).join(this.stringJoinChar);this.collectedValues[Rt][Mt][Vt]||(this.collectedValues[Rt][Mt][Vt]=new this.aggregators[It.SUM]({key:Rt,dimension:Rt,isRecord:void 0,needSplitPositiveAndNegative:this.needSplitPositiveAndNegative})),this.collectedValues[Rt][Mt][Vt].push(t)}else if(this.collectValuesBy[Rt].range){const Vt=this.collectedValues[Rt][Mt],Xt=Math.max(t[Rt],Vt.max),de=Math.min(t[Rt],Vt.min);isNaN(Xt)||(Vt.max=Xt,Vt.min=de)}else{const Vt=this.collectedValues[Rt][Mt];Vt.indexOf(t[Rt])===-1&&Vt.push(t[Rt])}}let me=!1;const Ve=[],ne=[];if(!this.parseCustomTreeToMatchRecords||!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart||!(!((r=this.customRowTree)===null||r===void 0)&&r.length)||e||this.hasExtensionRowTree){const Rt=[];ne.push({rowKey:Rt,indicatorKey:e});for(let Mt=0,Vt=this.rows.length;Mt<Vt;Mt++){const Xt=this.rows[Mt];if(Xt in t)this.rowsHasValue[Mt]=!0,Rt.push(t[Xt]);else if(Xt!==ji){if(!((a=(l=(s=this.dataConfig)===null||s===void 0?void 0:s.totals)===null||l===void 0?void 0:l.row)===null||a===void 0)&&a.showGrandTotals&&Mt===0&&!this.rows.find(de=>de in t)){Rt.push(this.rowGrandTotalLabel),me=!0;break}if(!((u=(d=(h=this.dataConfig)===null||h===void 0?void 0:h.totals)===null||d===void 0?void 0:d.row)===null||u===void 0)&&u.subTotalsDimensions&&((f=(g=(c=this.dataConfig)===null||c===void 0?void 0:c.totals)===null||g===void 0?void 0:g.row)===null||f===void 0?void 0:f.subTotalsDimensions.indexOf(this.rows[Mt-1]))>=0){this.rowHierarchyType==="grid"&&Rt.push(this.rowSubTotalLabel),me=!0;break}}}}else{const Rt=this.getFieldMatchRowDimensionPaths(t);if(Rt.length>0)for(let Mt=0,Vt=Rt.length;Mt<Vt;Mt++){const Xt=Rt[Mt],de=[];let $t;for(let Lt=0,we=Xt.length;Lt<we;Lt++)z(Xt[Lt].indicatorKey)?$t=Xt[Lt].indicatorKey:de.push(Xt[Lt].value);ne.push({rowKey:de,indicatorKey:$t})}}if(!this.parseCustomTreeToMatchRecords||!((p=this.dataConfig)===null||p===void 0)&&p.isPivotChart||!(!((m=this.customColTree)===null||m===void 0)&&m.length)||e||this.hasExtensionRowTree){const Rt=[];Ve.push({colKey:Rt,indicatorKey:e});for(let Mt=0,Vt=this.columns.length;Mt<Vt;Mt++){const Xt=this.columns[Mt];if(Xt in t)this.columnsHasValue[Mt]=!0,Rt.push(t[Xt]);else if(Xt!==ji){if(!((S=(C=(v=this.dataConfig)===null||v===void 0?void 0:v.totals)===null||C===void 0?void 0:C.column)===null||S===void 0)&&S.showGrandTotals&&Mt===0&&!this.columns.find(de=>de in t)){Rt.push(this.colGrandTotalLabel),me=!0;break}if(!((w=(y=(_=this.dataConfig)===null||_===void 0?void 0:_.totals)===null||y===void 0?void 0:y.column)===null||w===void 0)&&w.subTotalsDimensions&&((x=(R=(A=this.dataConfig)===null||A===void 0?void 0:A.totals)===null||R===void 0?void 0:R.column)===null||x===void 0?void 0:x.subTotalsDimensions.indexOf(this.columns[Mt-1]))>=0){Rt.push(this.colSubTotalLabel),me=!0;break}}}}else{const Rt=this.getFieldMatchColDimensionPaths(t);if(Rt.length>0)for(let Mt=0,Vt=Rt.length;Mt<Vt;Mt++){const Xt=Rt[Mt],de=[];let $t;for(let Lt=0,we=Xt.length;Lt<we;Lt++)z(Xt[Lt].indicatorKey)?$t=Xt[Lt].indicatorKey:de.push(Xt[Lt].value);Ve.push({colKey:de,indicatorKey:$t})}}for(let Rt=0;Rt<ne.length;Rt++){const Mt=ne[Rt].rowKey;let Vt;this.indicatorsAsCol||(Vt=ne[Rt].indicatorKey);for(let Xt=0;Xt<Ve.length;Xt++){const de=Ve[Xt].colKey;this.indicatorsAsCol&&(Vt=Ve[Xt].indicatorKey);const $t=Mt.join(this.stringJoinChar),Lt=de.join(this.stringJoinChar);if(me){this.totalRecordsTree[$t]||(this.totalRecordsTree[$t]={}),this.totalRecordsTree[$t][Lt]||(this.totalRecordsTree[$t][Lt]=[]);const Et=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Ut=0;Ut<Et.length;Ut++)if(this.calculatedFiledKeys.indexOf(Et[Ut])>=0){const Ae=(M=this.calculatedFieldRules)===null||M===void 0?void 0:M.find(ai=>ai.key===Et[Ut]);!((B=(T=this.totalRecordsTree[$t])===null||T===void 0?void 0:T[Lt])===null||B===void 0)&&B[Ut]||(this.totalRecordsTree[$t][Lt][Ut]=new this.aggregators[It.RECALCULATE]({key:Et[Ut],dimension:Et[Ut],isRecord:!0,formatFun:(k=(H=this.indicators)===null||H===void 0?void 0:H.find(ai=>typeof ai!="string"&&ai.indicatorKey===Et[Ut]))===null||k===void 0?void 0:k.format,calculateFun:Ae==null?void 0:Ae.calculateFun,dependAggregators:this.totalRecordsTree[$t][Lt],dependIndicatorKeys:Ae==null?void 0:Ae.dependIndicatorKeys})),Et[Ut]in t&&((E=(P=this.totalRecordsTree[$t])===null||P===void 0?void 0:P[Lt])===null||E===void 0||E[Ut].push(t))}else{const Ae=this.getAggregatorRule(Et[Ut]);!((I=(F=this.totalRecordsTree[$t])===null||F===void 0?void 0:F[Lt])===null||I===void 0)&&I[Ut]||(this.totalRecordsTree[$t][Lt][Ut]=new this.aggregators[(L=Ae==null?void 0:Ae.aggregationType)!==null&&L!==void 0?L:It.SUM]({key:Et[Ut],dimension:(D=Ae==null?void 0:Ae.field)!==null&&D!==void 0?D:Et[Ut],formatFun:(O=Ae==null?void 0:Ae.formatFun)!==null&&O!==void 0?O:(W=(V=this.indicators)===null||V===void 0?void 0:V.find(ai=>typeof ai!="string"&&ai.indicatorKey===Et[Ut]))===null||W===void 0?void 0:W.format})),Et[Ut]in t&&(($=(j=this.totalRecordsTree[$t])===null||j===void 0?void 0:j[Lt])===null||$===void 0||$[Ut].push(t))}return}Mt.length!==0&&(this.rowFlatKeys[$t]||(this.rowKeys.push(Mt),this.rowFlatKeys[$t]=1)),de.length!==0&&(this.colFlatKeys[Lt]||(this.colKeys.push(de),this.colFlatKeys[Lt]=1)),this.tree[$t]||(this.tree[$t]={}),!((X=this.tree[$t])===null||X===void 0)&&X[Lt]||(this.tree[$t][Lt]=[]);const we=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Et=0;Et<we.length;Et++)if(this.calculatedFiledKeys.indexOf(we[Et])>=0){const Ut=(K=this.calculatedFieldRules)===null||K===void 0?void 0:K.find(Ae=>Ae.key===we[Et]);!((Q=(U=this.tree[$t])===null||U===void 0?void 0:U[Lt])===null||Q===void 0)&&Q[Et]||(this.tree[$t][Lt][Et]=new this.aggregators[It.RECALCULATE]({key:we[Et],dimension:we[Et],isRecord:!0,formatFun:(pt=(dt=this.indicators)===null||dt===void 0?void 0:dt.find(Ae=>typeof Ae!="string"&&Ae.indicatorKey===we[Et]))===null||pt===void 0?void 0:pt.format,calculateFun:Ut==null?void 0:Ut.calculateFun,dependAggregators:this.tree[$t][Lt],dependIndicatorKeys:Ut==null?void 0:Ut.dependIndicatorKeys})),(G=(xt=this.tree[$t])===null||xt===void 0?void 0:xt[Lt])===null||G===void 0||G[Et].push(t)}else{const Ut=this.getAggregatorRule(we[Et]);let Ae=!1;Vt?e===Vt?we[Et]===Vt&&(Ae=!0):we[Et]===Vt&&we[Et]in t&&(Ae=!0):Ut!=null&&Ut.field?typeof(Ut==null?void 0:Ut.field)=="string"?(Ut==null?void 0:Ut.field)in t&&(Ae=!0):Ut!=null&&Ut.field.find(ai=>ai in t)&&(Ae=!0):we[Et]in t&&(Ae=!0),!(!((ot=(q=this.tree[$t])===null||q===void 0?void 0:q[Lt])===null||ot===void 0)&&ot[Et])&&Ae&&(this.tree[$t][Lt][Et]=new this.aggregators[(ct=Ut==null?void 0:Ut.aggregationType)!==null&&ct!==void 0?ct:It.SUM]({key:we[Et],dimension:(_t=Ut==null?void 0:Ut.field)!==null&&_t!==void 0?_t:we[Et],formatFun:(yt=Ut==null?void 0:Ut.formatFun)!==null&&yt!==void 0?yt:(et=(ht=this.indicators)===null||ht===void 0?void 0:ht.find(ai=>typeof ai!="string"&&ai.indicatorKey===we[Et]))===null||et===void 0?void 0:et.format})),Ae&&((st=(mt=this.tree[$t])===null||mt===void 0?void 0:mt[Lt])===null||st===void 0||st[Et].push(t))}if(this.mappingRules)for(let Et=0;Et<this.indicatorKeys.length;Et++){if(!this.indicatorStatistics[Et]){const Ut=this.getAggregatorRule(this.indicatorKeys[Et]);this.indicatorStatistics[Et]={max:new this.aggregators[It.MAX]({key:this.indicatorKeys[Et],dimension:this.indicatorKeys[Et]}),min:new this.aggregators[It.MIN]({key:this.indicatorKeys[Et],dimension:this.indicatorKeys[Et]}),total:new this.aggregators[(Ft=Ut==null?void 0:Ut.aggregationType)!==null&&Ft!==void 0?Ft:It.SUM]({key:this.indicatorKeys[Et],dimension:(Ht=Ut==null?void 0:Ut.field)!==null&&Ht!==void 0?Ht:this.indicatorKeys[Et],formatFun:(vt=Ut==null?void 0:Ut.formatFun)!==null&&vt!==void 0?vt:(_e=(Pt=this.indicators)===null||Pt===void 0?void 0:Pt.find(Ae=>typeof Ae!="string"&&Ae.indicatorKey===this.indicatorKeys[Et]))===null||_e===void 0?void 0:_e.format})}}this.indicatorStatistics[Et].max.push((gt=(ge=this.tree[$t])===null||ge===void 0?void 0:ge[Lt])===null||gt===void 0?void 0:gt[Et].value()),this.indicatorStatistics[Et].min.push((Fe=(Le=this.tree[$t])===null||Le===void 0?void 0:Le[Lt])===null||Fe===void 0?void 0:Fe[Et].value()),this.indicatorStatistics[Et].total.push(t)}}}}updateSortRules(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S;this.sorted=!1,this.sortRules=t,this.sortKeys(),this.customRowTree||(this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((_,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((_,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u)),this.customColTree||(this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((_,y)=>this.columnsHasValue[y]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(S=(C=(v=this.totals)===null||v===void 0?void 0:v.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&S!==void 0&&S))}updateFilterRules(t,e=!1){var n,o;if(this.filterRules=t,this.filteredRecords=void 0,e)this.tree={};else for(const r in this.tree)for(const s in this.tree[r])for(let l=0;l<this.tree[r][s].length;l++)(n=this.tree[r][s][l])===null||n===void 0||n.reset();this.collectedValues={},this.processRecords(),this.processCollectedValuesWithSumBy(),this.processCollectedValuesWithSortBy(),this.totalStatistics(),!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart&&this.cacheDeminsionCollectedValues()}getAggregatorRule(t){var e;return(e=this.aggregationRules)===null||e===void 0?void 0:e.find((n,o)=>t===n.indicatorKey)}getAggregator(t=[],e=[],n,o=!0,r){var s,l,a,h;const d=this.indicatorKeys.indexOf(n);let u,c;typeof t=="string"?u=t:(r&&r.position!=="row"||t.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||t.splice(p,1)}),u=sT(t,this.stringJoinChar)),typeof e=="string"?c=e:(r&&r.position!=="col"||e.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||e.splice(p,1)}),c=sT(e,this.stringJoinChar));const g=(l=(s=this.tree[u])===null||s===void 0?void 0:s[c])===null||l===void 0?void 0:l[d];if(o&&z((h=(a=this.changedTree[u])===null||a===void 0?void 0:a[c])===null||h===void 0?void 0:h[d])){const f=this.changedTree[u][c][d];return g?{value:()=>f,formatValue:g.formatValue,formatFun:g.formatFun,records:g.records,className:"",recalculate(){},push(){},deleteRecord(){},updateRecord(){},clearCacheValue(){},reset(){}}:{value:()=>f,className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},formatValue:()=>f,clearCacheValue(){},reset(){}}}return g||{className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},value:()=>null,clearCacheValue(){},reset(){}}}sortKeys(){if(this.colKeys=this.colKeys_normal.slice(),this.rowKeys=this.rowKeys_normal.slice(),!this.sorted){this.sorted=!0,this.rowKeys.sort(this.arrSort(this.rows,!0));const t=this.arrSort(this.columns,!1);this.colKeys.sort(t)}}arrSort(t,e){let n;const o=this,r=function(s){const l=[];for(let a=0,h=t.length;a<h;a++)if(n=t[a],o.sortRules)for(let d=0,u=o.sortRules.length;d<u;d++)o.sortRules[d].sortField===n&&l.push({field:n,fieldIndex:a,sortRule:o.sortRules[d],func:o.getSort(o.sortRules[d],e)});return l}.call(this);return function(s,l){var a,h,d,u;let c,g;for(let f=0;f<r.length;f++){if(g=r[f],(a=g.sortRule)===null||a===void 0?void 0:a.sortByIndicator){let p=s,m=l;g.fieldIndex<t.length-1&&(p=s.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?p.push(o.rowSubTotalLabel):e||p.push(o.colSubTotalLabel),m=l.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?m.push(o.rowSubTotalLabel):e||m.push(o.colSubTotalLabel)),c=g.func(p,m,(h=g.sortRule)===null||h===void 0?void 0:h.sortType)}else c=(d=g.func)===null||d===void 0?void 0:d.call(g,s[g.fieldIndex],l[g.fieldIndex],(u=g.sortRule)===null||u===void 0?void 0:u.sortType);if(c!==0)return c}return 0}}getSort(t,e){const n=this;return t.sortByIndicator?(o,r,s)=>{const l=function(a,h){return n.rowHierarchyType==="grid"&&a.length<n.rows.length&&a[a.length-1]!==n.rowSubTotalLabel&&a[a.length-1]!==n.rowGrandTotalLabel&&a.push(n.rowSubTotalLabel),h.length<n.columns.length&&h[h.length-1]!==n.colSubTotalLabel&&h[h.length-1]!==n.colGrandTotalLabel&&h.push(n.colSubTotalLabel),n.getAggregator(a,h,t.sortByIndicator).value()};return e?lc(l(o,t.query),l(r,t.query),s):lc(l(t.query,o),l(t.query,r),s)}:t.sortBy?xW(t.sortBy):t.sortFunc?t.sortFunc:t.sortType?SW:lc}totalStatistics(){var t,e,n,o,r,s,l,a,h,d,u,c,g,f;const p=this,m=(v,C)=>{var S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q,ot,ct,_t,yt,ht,et,mt,st,Ft,Ht,vt,Pt,_e,ge,gt,Le,Fe,me;if(!((_=(S=this.totalRecordsTree)===null||S===void 0?void 0:S[v])===null||_===void 0)&&_[C])return this.tree[v]||(this.tree[v]={}),void(this.tree[v][C]=(w=(y=this.totalRecordsTree)===null||y===void 0?void 0:y[v])===null||w===void 0?void 0:w[C]);const Ve=C.split(this.stringJoinChar);if(!((R=(A=p.totals)===null||A===void 0?void 0:A.column)===null||R===void 0)&&R.subTotalsDimensions&&((T=(M=(x=p.totals)===null||x===void 0?void 0:x.column)===null||M===void 0?void 0:M.subTotalsDimensions)===null||T===void 0?void 0:T.length)>0&&p.totals.column.showSubTotals!==!1)for(let ne=0,Rt=(k=(H=(B=p.totals)===null||B===void 0?void 0:B.column)===null||H===void 0?void 0:H.subTotalsDimensions)===null||k===void 0?void 0:k.length;ne<Rt;ne++){const Mt=p.totals.column.subTotalsDimensions[ne],Vt=p.columns.indexOf(Mt);if(Vt>=0){const Xt=Ve.slice(0,Vt+1);Xt.push(p.colSubTotalLabel);const de=Xt.join(this.stringJoinChar);if(!((E=(P=this.totalRecordsTree)===null||P===void 0?void 0:P[v])===null||E===void 0)&&E[de])return void(this.tree[v][de]=(I=(F=this.totalRecordsTree)===null||F===void 0?void 0:F[v])===null||I===void 0?void 0:I[de]);this.tree[v][de]||(this.tree[v][de]=[]);const $t=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Lt=0;Lt<$t.length;Lt++)if(this.calculatedFiledKeys.indexOf($t[Lt])>=0){const we=(L=this.calculatedFieldRules)===null||L===void 0?void 0:L.find(Et=>Et.key===$t[Lt]);!((O=(D=this.tree[v])===null||D===void 0?void 0:D[de])===null||O===void 0)&&O[Lt]||(this.tree[v][de][Lt]=new this.aggregators[It.RECALCULATE]({key:$t[Lt],dimension:$t[Lt],isRecord:!0,formatFun:(W=(V=this.indicators)===null||V===void 0?void 0:V.find(Et=>typeof Et!="string"&&Et.indicatorKey===$t[Lt]))===null||W===void 0?void 0:W.format,calculateFun:we==null?void 0:we.calculateFun,dependAggregators:this.tree[v][de],dependIndicatorKeys:we==null?void 0:we.dependIndicatorKeys})),de!==C&&this.tree[v][de][Lt].push(($=(j=p.tree[v])===null||j===void 0?void 0:j[C])===null||$===void 0?void 0:$[Lt])}else{if(!this.tree[v][de][Lt]){const we=this.getAggregatorRule($t[Lt]);this.tree[v][de][Lt]=new this.aggregators[(X=we==null?void 0:we.aggregationType)!==null&&X!==void 0?X:It.SUM]({key:$t[Lt],dimension:(K=we==null?void 0:we.field)!==null&&K!==void 0?K:$t[Lt],formatFun:(U=we==null?void 0:we.formatFun)!==null&&U!==void 0?U:(dt=(Q=this.indicators)===null||Q===void 0?void 0:Q.find(Et=>typeof Et!="string"&&Et.indicatorKey===$t[Lt]))===null||dt===void 0?void 0:dt.format})}de!==C&&this.tree[v][de][Lt].push((xt=(pt=p.tree[v])===null||pt===void 0?void 0:pt[C])===null||xt===void 0?void 0:xt[Lt])}}}if(!((q=(G=p.totals)===null||G===void 0?void 0:G.column)===null||q===void 0)&&q.showGrandTotals||this.rows.length===0){const ne=p.colGrandTotalLabel;if(!((ct=(ot=this.totalRecordsTree)===null||ot===void 0?void 0:ot[v])===null||ct===void 0)&&ct[ne])return void(this.tree[v][ne]=(yt=(_t=this.totalRecordsTree)===null||_t===void 0?void 0:_t[v])===null||yt===void 0?void 0:yt[ne]);this.tree[v][ne]||(this.tree[v][ne]=[]);const Rt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Mt=0;Mt<Rt.length;Mt++)if(this.calculatedFiledKeys.indexOf(Rt[Mt])>=0){const Vt=(ht=this.calculatedFieldRules)===null||ht===void 0?void 0:ht.find(Xt=>Xt.key===Rt[Mt]);!((mt=(et=this.tree[v])===null||et===void 0?void 0:et[ne])===null||mt===void 0)&&mt[Mt]||(this.tree[v][ne][Mt]=new this.aggregators[It.RECALCULATE]({key:Rt[Mt],dimension:Rt[Mt],isRecord:!0,formatFun:(Ft=(st=this.indicators)===null||st===void 0?void 0:st.find(Xt=>typeof Xt!="string"&&Xt.indicatorKey===Rt[Mt]))===null||Ft===void 0?void 0:Ft.format,calculateFun:Vt==null?void 0:Vt.calculateFun,dependAggregators:this.tree[v][ne],dependIndicatorKeys:Vt==null?void 0:Vt.dependIndicatorKeys})),ne!==C&&this.tree[v][ne][Mt].push((vt=(Ht=p.tree[v])===null||Ht===void 0?void 0:Ht[C])===null||vt===void 0?void 0:vt[Mt])}else{if(!this.tree[v][ne][Mt]){const Vt=this.getAggregatorRule(Rt[Mt]);this.tree[v][ne][Mt]=new this.aggregators[(Pt=Vt==null?void 0:Vt.aggregationType)!==null&&Pt!==void 0?Pt:It.SUM]({key:Rt[Mt],dimension:(_e=Vt==null?void 0:Vt.field)!==null&&_e!==void 0?_e:Rt[Mt],formatFun:(ge=Vt==null?void 0:Vt.formatFun)!==null&&ge!==void 0?ge:(Le=(gt=this.indicators)===null||gt===void 0?void 0:gt.find(Xt=>typeof Xt!="string"&&Xt.indicatorKey===Rt[Mt]))===null||Le===void 0?void 0:Le.format})}ne!==C&&this.tree[v][ne][Mt].push((me=(Fe=p.tree[v])===null||Fe===void 0?void 0:Fe[C])===null||me===void 0?void 0:me[Mt])}}};if(!((e=(t=p==null?void 0:p.totals)===null||t===void 0?void 0:t.column)===null||e===void 0)&&e.subTotalsDimensions&&((r=(o=(n=p==null?void 0:p.totals)===null||n===void 0?void 0:n.column)===null||o===void 0?void 0:o.subTotalsDimensions)===null||r===void 0?void 0:r.length)>=1||!((l=(s=p==null?void 0:p.totals)===null||s===void 0?void 0:s.row)===null||l===void 0)&&l.subTotalsDimensions&&((d=(h=(a=p==null?void 0:p.totals)===null||a===void 0?void 0:a.row)===null||h===void 0?void 0:h.subTotalsDimensions)===null||d===void 0?void 0:d.length)>=1||!((c=(u=p==null?void 0:p.totals)===null||u===void 0?void 0:u.column)===null||c===void 0)&&c.showGrandTotals||!((f=(g=p==null?void 0:p.totals)===null||g===void 0?void 0:g.row)===null||f===void 0)&&f.showGrandTotals){const v=[];Object.keys(p.tree).forEach(C=>{const S=C.split(this.stringJoinChar);Object.keys(p.tree[C]).forEach(_=>{var y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q;if(!((w=(y=p.totals)===null||y===void 0?void 0:y.row)===null||w===void 0)&&w.subTotalsDimensions&&((x=(R=(A=p.totals)===null||A===void 0?void 0:A.row)===null||R===void 0?void 0:R.subTotalsDimensions)===null||x===void 0?void 0:x.length)>0&&p.totals.row.showSubTotals!==!1)for(let ot=0,ct=(B=(T=(M=p.totals)===null||M===void 0?void 0:M.row)===null||T===void 0?void 0:T.subTotalsDimensions)===null||B===void 0?void 0:B.length;ot<ct;ot++){const _t=p.totals.row.subTotalsDimensions[ot],yt=p.rows.indexOf(_t);if(yt>=0&&yt<p.rows.length-1){const ht=S.slice(0,yt+1);this.rowHierarchyType==="grid"&&ht.push(p.rowSubTotalLabel);const et=ht.join(this.stringJoinChar);this.tree[et]||(this.tree[et]={},v.push(et)),this.tree[et][_]||(this.tree[et][_]=[]);const mt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let st=0;st<mt.length;st++){if(!this.tree[et][_][st])if(this.calculatedFiledKeys.indexOf(mt[st])>=0){const Ft=(H=this.calculatedFieldRules)===null||H===void 0?void 0:H.find(Ht=>Ht.key===mt[st]);this.tree[et][_][st]=new this.aggregators[It.RECALCULATE]({key:mt[st],dimension:mt[st],isRecord:!0,formatFun:(P=(k=this.indicators)===null||k===void 0?void 0:k.find(Ht=>typeof Ht!="string"&&Ht.indicatorKey===mt[st]))===null||P===void 0?void 0:P.format,calculateFun:Ft==null?void 0:Ft.calculateFun,dependAggregators:this.tree[et][_],dependIndicatorKeys:Ft==null?void 0:Ft.dependIndicatorKeys})}else{const Ft=this.getAggregatorRule(mt[st]);this.tree[et][_][st]=new this.aggregators[(E=Ft==null?void 0:Ft.aggregationType)!==null&&E!==void 0?E:It.SUM]({key:mt[st],dimension:(F=Ft==null?void 0:Ft.field)!==null&&F!==void 0?F:mt[st],formatFun:(I=Ft==null?void 0:Ft.formatFun)!==null&&I!==void 0?I:(D=(L=this.indicators)===null||L===void 0?void 0:L.find(Ht=>typeof Ht!="string"&&Ht.indicatorKey===mt[st]))===null||D===void 0?void 0:D.format})}et!==C&&this.tree[et][_][st].push((V=(O=p.tree[C])===null||O===void 0?void 0:O[_])===null||V===void 0?void 0:V[st])}}}if(!((j=(W=p.totals)===null||W===void 0?void 0:W.row)===null||j===void 0)&&j.showGrandTotals||this.columns.length===0){const ot=p.rowGrandTotalLabel;this.tree[ot]||(this.tree[ot]={},v.push(ot)),this.tree[ot][_]||(this.tree[ot][_]=[]);const ct=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let _t=0;_t<ct.length;_t++){if(!this.tree[ot][_][_t])if(this.calculatedFiledKeys.indexOf(ct[_t])>=0){const yt=($=this.calculatedFieldRules)===null||$===void 0?void 0:$.find(ht=>ht.key===ct[_t]);this.tree[ot][_][_t]=new this.aggregators[It.RECALCULATE]({key:ct[_t],dimension:ct[_t],isRecord:!0,formatFun:(K=(X=this.indicators)===null||X===void 0?void 0:X.find(ht=>typeof ht!="string"&&ht.indicatorKey===ct[_t]))===null||K===void 0?void 0:K.format,calculateFun:yt==null?void 0:yt.calculateFun,dependAggregators:this.tree[ot][_],dependIndicatorKeys:yt==null?void 0:yt.dependIndicatorKeys})}else{const yt=this.getAggregatorRule(ct[_t]);this.tree[ot][_][_t]=new this.aggregators[(U=yt==null?void 0:yt.aggregationType)!==null&&U!==void 0?U:It.SUM]({key:ct[_t],dimension:(Q=yt==null?void 0:yt.field)!==null&&Q!==void 0?Q:ct[_t],formatFun:(dt=yt==null?void 0:yt.formatFun)!==null&&dt!==void 0?dt:(xt=(pt=this.indicators)===null||pt===void 0?void 0:pt.find(ht=>typeof ht!="string"&&ht.indicatorKey===ct[_t]))===null||xt===void 0?void 0:xt.format})}ot!==C&&this.tree[ot][_][_t].push((q=(G=p.tree[C])===null||G===void 0?void 0:G[_])===null||q===void 0?void 0:q[_t])}}m(C,_)})}),v.forEach(C=>{Object.keys(p.tree[C]).forEach(S=>{m(C,S)})})}for(const v in p.totalRecordsTree)for(const C in p.totalRecordsTree[v])m(v,C)}ArrToTree1(t,e,n,o,r){const s=[],l=this.stringJoinChar,a=new Map;function h(d){const u=[];let c;d.forEach((g,f)=>{var p;u.push(g);const m=u.join(l);let v=a.get(m);v||(v={value:g,dimensionKey:e[f],children:f===d.length-1&&((p=n==null?void 0:n.length)!==null&&p!==void 0?p:0)>=1?n==null?void 0:n.map(C=>typeof C=="string"?{indicatorKey:C,value:C}:{indicatorKey:C.indicatorKey,value:C.title}):[]},a.set(m,v),c?c.children.push(v):s.push(v)),c=v})}return t.forEach(d=>h(d)),o&&h([r]),s}ArrToTree(t,e,n,o,r,s,l,a,h){var d;let u=[];const c=this.stringJoinChar,g=new Map;if(t!=null&&t.length?t.forEach(f=>function(p){const m=[];let v;p.forEach((C,S)=>{var _,y,w,A;m.push(C);const R=m.join(c);let x=g.get(R);if(!x){if(x={value:C,dimensionKey:e[S],children:S===p.length-1&&((_=n==null?void 0:n.length)!==null&&_!==void 0?_:0)>=1?n==null?void 0:n.map(M=>typeof M=="string"?{indicatorKey:M,value:M}:{indicatorKey:M.indicatorKey,value:M.title}):[]},o[S]){let M=(y=x.children)!==null&&y!==void 0?y:[];const T={value:l,dimensionKey:e[S+1],levelSpan:o.length-S-1,children:((w=n==null?void 0:n.length)!==null&&w!==void 0?w:0)>=1?n==null?void 0:n.map(B=>typeof B=="string"?{indicatorKey:B,value:B}:{indicatorKey:B.indicatorKey,value:B.title}):[]};M.push(T),M=(A=T.children)!==null&&A!==void 0?A:[]}g.set(R,x),v?o[S-1]&&!h?v.children.splice(v.children.length-1,0,x):v.children.push(x):u.push(x)}v=x})}(f)):n&&(u=n==null?void 0:n.map(f=>{var p;return typeof f=="string"?{indicatorKey:f,value:f}:{indicatorKey:f.indicatorKey,value:(p=f.title)!==null&&p!==void 0?p:f.indicatorKey}})),r&&(t==null?void 0:t.length)){const f={value:s,dimensionKey:e[0],levelSpan:o.length,children:(d=n==null?void 0:n.map(p=>typeof p=="string"?{indicatorKey:p,value:p}:{indicatorKey:p.indicatorKey,value:p.title}))!==null&&d!==void 0?d:[]};a?u.unshift(f):u.push(f)}return u}cacheDeminsionCollectedValues(){for(const t in this.collectValuesBy)this.collectValuesBy[t].type!=="xField"&&this.collectValuesBy[t].type!=="yField"||(this.dataConfig.dimensionSortArray?this.cacheCollectedValues[t]=f9(this.collectedValues[t],this.dataConfig.dimensionSortArray):this.cacheCollectedValues[t]=this.collectedValues[t])}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l;const a=this.indicatorKeys.indexOf(n);let h,d;h=typeof t=="string"?t:t.join(this.stringJoinChar),d=typeof e=="string"?e:e.join(this.stringJoinChar),!((r=this.changedTree[h])===null||r===void 0)&&r[d]?this.changedTree[h][d][a]=o:this.changedTree[h]?(this.changedTree[h][d]=[],this.changedTree[h][d][a]=o):(this.changedTree[h]={},this.changedTree[h][d]=[],this.changedTree[h][d][a]=o);const u=(l=(s=this.tree[h])===null||s===void 0?void 0:s[d])===null||l===void 0?void 0:l[a];(u==null?void 0:u.records.length)===1&&(u.records[0][this.indicatorKeys[a]]=o)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.indicatorKeys.length;r++)this.indicatorKeys[r]===t&&(o=!0);if(!o){if(Array.isArray(this.records))for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}else for(const r in this.records)for(let s=0,l=this.records[r].length;s<l;s++){const a=this.records[r][s];a[t]===e&&(a[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}_rowTreeHasChanged(){this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))}changeDataConfig(t){this.rows=t.rows,this.columns=t.columns}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}Array.isArray(this.records)&&this.records.push(t)}customTreeToDimensionPathArr(t,e){const n=[],o=this;function r(s,l){var a,h,d;s.virtual||(!((a=l[l.length-1])===null||a===void 0)&&a.childKeys&&s.dimensionKey&&l[l.length-1].childKeys.indexOf(s.dimensionKey)===-1&&s.dimensionKey!==l[l.length-1].dimensionKey&&l[l.length-1].childKeys.push(s.dimensionKey),l.push({dimensionKey:z(s.indicatorKey)?void 0:s.dimensionKey,value:s.value,indicatorKey:s.indicatorKey,virtual:s.virtual})),((h=s.children)===null||h===void 0?void 0:h.length)>0?(o.rowHierarchyType==="tree"&&e==="row"&&(l[l.length-1].childKeys=[],n.push([...l])),(d=s.children)===null||d===void 0||d.forEach(u=>r(u,[...l]))):n.push(l)}return t==null||t.forEach(s=>r(s,[])),n}getFieldMatchColDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customColTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customColTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}}l&&o.push(s)}return o}getFieldMatchRowDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customRowTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customRowTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}if(h.childKeys&&a===s.length-1&&h.childKeys.length>0&&h.childKeys.find(d=>z(t[d]))){l=!1;break}}l&&(this.indicatorsAsCol||this.rowHierarchyType!=="tree"||s.find(a=>a.indicatorKey)||(l=!1)),l&&o.push(s)}return o}}function f9(i,t){return i.sort((e,n)=>{const o=t.indexOf(e),r=t.indexOf(n);return o<r?-1:o>r?1:0})}let lT=class extends ag{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C;if(Qt.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},e){e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Pe(e.columns),this.internalProps.rows=Pe(e.rows),this.internalProps.indicators=io(e.indicators),(n=e.indicators)===null||n===void 0||n.forEach((_,y)=>{typeof _=="object"&&(_!=null&&_.editor)&&(this.internalProps.indicators[y].editor=_.editor)}),this.internalProps.columnTree=!e.indicatorsAsCol||!((o=e.columns)===null||o===void 0)&&o.length||e.columnTree?Pe(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((r=e.rows)===null||r===void 0)&&r.length||e.rowTree?Pe(e.rowTree):[],this.internalProps.records=e.records,this.pagination=e.pagination,this.internalProps.columnResizeType=(s=e.columnResizeType)!==null&&s!==void 0?s:"column",this.internalProps.rowResizeType=(l=e.rowResizeType)!==null&&l!==void 0?l:"row",this.internalProps.dataConfig=Pe(e.dataConfig),this.internalProps.columnWidthConfig=e.columnWidthConfig;const S=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((a=S==null?void 0:S[0])===null||a===void 0?void 0:a.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((h=e.customConfig)===null||h===void 0?void 0:h.enableDataAnalysis)===!1){const _=new Me((d=this.internalProps.columnTree)!==null&&d!==void 0?d:[],this.layoutNodeId),y=new Me((u=this.internalProps.rowTree)!==null&&u!==void 0?u:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(c=this.options.rowExpandLevel)!==null&&c!==void 0?c:1:void 0);this.internalProps.layoutMap=new Jo(this,null,_,y),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new nv({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey},S))}else{const _=SA(this,e),{rowKeys:y,columnKeys:w,indicatorKeys:A}=_;let{columnDimensionTree:R,rowDimensionTree:x}=_;this.dataset=new xh(this.internalProps.dataConfig,y,w,A,this.internalProps.indicators,(g=e.indicatorsAsCol)===null||g===void 0||g,e.records,e.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!e.extensionRows,!!e.parseCustomTreeToMatchRecords),e.columnTree||(e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,e.indicators)),R=new Me((f=this.dataset.colHeaderTree)!==null&&f!==void 0?f:[],this.layoutNodeId)),e.rowTree||(e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,e.indicators)),x=new Me((p=this.dataset.rowHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(m=this.options.rowExpandLevel)!==null&&m!==void 0?m:1:void 0)),this.internalProps.layoutMap=new Jo(this,this.dataset,R,x)}if(this._changePivotSortStateBySortRules(),((C=(v=e.pivotSortState)===null||v===void 0?void 0:v.length)!==null&&C!==void 0?C:0)>0&&(this.pivotSortState=[],this.pivotSortState=e.pivotSortState),Qt.mode!=="node"&&(this.editorManager=new GA(this)),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.stateManager.initCheckedState(S),this.scenegraph.createSceneGraph(),e.title){const _=Bt.getComponent("title");this.internalProps.title=new _(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const _=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new _(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(nt.INITIALIZED,null)},0)}}static get EVENT_TYPE(){return qo}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!1}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n){if(this.internalProps.layoutMap.isSeriesNumber(t,e)&&this.internalProps.rowSeriesNumber.disableColumnResize===!0)return!1;if(!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S;const _=this.internalProps;if(super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Pe(t.columns),this.internalProps.rows=Pe(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?io(t.indicators):[],(n=t.indicators)===null||n===void 0||n.forEach((w,A)=>{typeof w=="object"&&(w!=null&&w.editor)&&(this.internalProps.indicators[A].editor=w.editor)}),this.internalProps.columnTree=!t.indicatorsAsCol||!((o=t.columns)===null||o===void 0)&&o.length||t.columnTree?Pe(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((r=t.rows)===null||r===void 0)&&r.length||t.rowTree?Pe(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.stateManager.initCheckedState(this.internalProps.records),this.stateManager.updateDrillState(void 0,void 0,!1,!1,-1,-1),this.pagination=t.pagination,_.columnResizeType=(s=t.columnResizeType)!==null&&s!==void 0?s:"column",_.rowResizeType=(l=t.rowResizeType)!==null&&l!==void 0?l:"row",_.dataConfig=Pe(t.dataConfig),this.internalProps.columnWidthConfig=t.columnWidthConfig,(t==null?void 0:t.rowHierarchyType)==="tree"&&this.internalProps.layoutMap.rowHierarchyType==="tree"&&this.internalProps.layoutMap.rowExpandLevel===(t==null?void 0:t.rowExpandLevel)){const w=this.internalProps.layoutMap.rowDimensionTree.tree.children;(a=this.internalProps.rowTree)===null||a===void 0||a.forEach((A,R)=>{const x=w.find(M=>M.dimensionKey===A.dimensionKey&&M.value===A.value);x&&this._syncHierarchyState(x,A)})}const y=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((h=y==null?void 0:y[0])===null||h===void 0?void 0:h.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((d=t.customConfig)===null||d===void 0?void 0:d.enableDataAnalysis)===!1){let w,A;t.columnTree&&(w=new Me((u=this.internalProps.columnTree)!==null&&u!==void 0?u:[],this.layoutNodeId)),t.rowTree&&(A=new Me((c=this.internalProps.rowTree)!==null&&c!==void 0?c:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(g=this.options.rowExpandLevel)!==null&&g!==void 0?g:1:void 0)),_.layoutMap=new Jo(this,null,w,A),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new nv({rows:_.layoutMap.fullRowDimensionKeys,columns:_.layoutMap.colDimensionKeys,indicators:_.layoutMap.indicatorKeys,indicatorsAsCol:_.layoutMap.indicatorsAsCol,indicatorDimensionKey:_.layoutMap.indicatorDimensionKey},y))}else{const w=SA(this,t),{rowKeys:A,columnKeys:R,indicatorKeys:x}=w;let{columnDimensionTree:M,rowDimensionTree:T}=w;this.dataset=new xh(_.dataConfig,A,R,x,this.internalProps.indicators,(f=t.indicatorsAsCol)===null||f===void 0||f,y,t.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!t.extensionRows,!!t.parseCustomTreeToMatchRecords),t.columnTree||(t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,t.indicators)),M=new Me((p=this.dataset.colHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId)),t.rowTree||(t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,t.indicators)),T=new Me((m=this.dataset.rowHeaderTree)!==null&&m!==void 0?m:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(v=this.options.rowExpandLevel)!==null&&v!==void 0?v:1:void 0)),_.layoutMap=new Jo(this,this.dataset,M,T)}if(this._changePivotSortStateBySortRules(),((S=(C=t.pivotSortState)===null||C===void 0?void 0:C.length)!==null&&S!==void 0?S:0)>0&&(this.pivotSortState=[],this.pivotSortState=t.pivotSortState),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,_.releaseList&&(_.releaseList.forEach(w=>{var A;return(A=w==null?void 0:w.release)===null||A===void 0?void 0:A.call(w)}),_.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const w=Bt.getComponent("title");this.internalProps.title=new w(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const w=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new w(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(w=>{setTimeout(w,0)})}updatePagination(t){t?(this.pagination||(this.pagination={currentPage:0,perPageCount:0}),typeof t.currentPage=="number"&&t.currentPage>=0&&(this.pagination.currentPage=t.currentPage),t.perPageCount&&(this.pagination.perPageCount=t.perPageCount||this.pagination.perPageCount),this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(this.pagination),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render()):this.pagination&&(this.pagination=void 0,this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(void 0),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render())}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a,h;const d=this,{layoutMap:u}=d.internalProps;u&&(d.colCount=(t=u.colCount)!==null&&t!==void 0?t:0,d.rowCount=(e=u.rowCount)!==null&&e!==void 0?e:0,this.internalProps.frozenColCount=Math.max(((n=u.rowHeaderLevelCount)!==null&&n!==void 0?n:0)+u.leftRowSeriesNumberColumnCount,(o=this.options.frozenColCount)!==null&&o!==void 0?o:0),d.frozenRowCount=Math.max(u.headerLevelCount,(r=this.options.frozenRowCount)!==null&&r!==void 0?r:0),d.bottomFrozenRowCount!==((s=this.options.bottomFrozenRowCount)!==null&&s!==void 0?s:0)&&(d.bottomFrozenRowCount=(l=this.options.bottomFrozenRowCount)!==null&&l!==void 0?l:0),d.rightFrozenColCount!==((a=this.options.rightFrozenColCount)!==null&&a!==void 0?a:0)&&(d.rightFrozenColCount=(h=this.options.rightFrozenColCount)!==null&&h!==void 0?h:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}get rowHierarchyType(){return this.internalProps.layoutMap.rowHierarchyType}_syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;if(!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r){const a=t.children.find(h=>h.dimensionKey===r.dimensionKey&&h.value===r.value);a&&this._syncHierarchyState(a,r)}}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getFieldData(t,e,n){var o,r,s;if(!this.internalProps.layoutMap.isHeader(e,n)){if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(n),a=this.getBodyIndexByCol(e);return(o=this.records[l])===null||o===void 0?void 0:o[a]}if(this.dataset){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n);if(l){let a;const h=(r=l.colHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(s=l.rowHeaderPaths)===null||s===void 0?void 0:s.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(e,n),!0,a);if(u.records&&u.records.length>=1)return u.records[0][t]}}else if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(e,n).indicatorKey,!1);if(d!=null&&d.record)return d==null?void 0:d.record[t]}}}getCellValue(t,e,n){var o,r,s,l,a,h,d;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isSeriesNumber(t,e)){if(this.internalProps.layoutMap.isSeriesNumberInHeader(t,e)){const{title:c}=this.internalProps.layoutMap.getSeriesNumberHeader(t,e);return c}const{format:u}=this.internalProps.layoutMap.getSeriesNumberBody(t,e);return typeof u=="function"?u(t,e,this):e-this.columnHeaderLevelCount+1}if(this.internalProps.layoutMap.isHeader(t,e)){const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.internalProps.recordsIsTwoDimensionalArray){const{fieldFormat:u}=this.internalProps.layoutMap.getBody(t,e),c=this.getBodyIndexByRow(e),g=this.getBodyIndexByCol(t),f=(o=this.records[c])===null||o===void 0?void 0:o[g];return typeof u=="function"?u(f,t,e,this):f}if(this.dataset){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e);let c;const g=(s=(r=u.colHeaderPaths)===null||r===void 0?void 0:r.filter(v=>!v.virtual))===null||s===void 0?void 0:s.map((v,C)=>{var S;return v.indicatorKey&&(c={position:"col",index:C}),(S=v.indicatorKey)!==null&&S!==void 0?S:v.value}),f=(a=(l=u.rowHeaderPaths)===null||l===void 0?void 0:l.filter(v=>!v.virtual))===null||a===void 0?void 0:a.map((v,C)=>{var S;return v.indicatorKey&&(c={position:"row",index:C}),(S=v.indicatorKey)!==null&&S!==void 0?S:v.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,c),{fieldFormat:m}=this.internalProps.layoutMap.getBody(t,e);return p.formatValue?p.formatValue(t,e,this):typeof m=="function"?m(p==null?void 0:p.value(),t,e,this):(h=p==null?void 0:p.value())!==null&&h!==void 0?h:""}if(this.flatDataToObjects){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e),c=u.colHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),g=u.rowHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),f=this.flatDataToObjects.getTreeNode(g,c,this.internalProps.layoutMap.getBody(t,e).indicatorKey),{fieldFormat:p}=this.internalProps.layoutMap.getBody(t,e);return typeof p=="function"?p(f==null?void 0:f.value,t,e,this):(d=f==null?void 0:f.value)!==null&&d!==void 0?d:""}}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return d==null?void 0:d.value}}getCellRawValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return d==null?void 0:d.value}}getCellOriginRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return h==null?void 0:h.record}}}getCellRawRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return h==null?void 0:h.record}}}updateSortRules(t,e,n){this.internalProps.dataConfig?this.internalProps.dataConfig.sortRules=t:this.internalProps.dataConfig={sortRules:t},this.dataset.updateSortRules(t),this._changePivotSortStateBySortRules();const{layoutMap:o}=this.internalProps;o.resetHeaderTree(),this.scenegraph.clearCells(),at(e)&&at(n)?(this.isRowHeader(e,n)?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):this.isCornerHeader(e,n)?o.cornerSetting.titleOnDimension==="column"?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):o.cornerSetting.titleOnDimension==="row"&&this.internalProps._heightResizedRowMap.clear():this.isColumnHeader(e,n)&&this.internalProps._heightResizedRowMap.clear(),this.refreshRowColCount()):this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(!0),this.render()}_changePivotSortStateBySortRules(){var t,e,n,o;this.pivotSortState=[];const r=(e=(t=this.internalProps.dataConfig)===null||t===void 0?void 0:t.sortRules)!==null&&e!==void 0?e:[];for(let s=0;s<r.length;s++){const l=r[s],a=[];if(l.sortByIndicator&&l.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])){for(let d=0;d<l.query.length;d++)a.push({dimensionKey:this.dataset.indicatorsAsCol?this.dataset.columns[d]:this.dataset.rows[d],value:l.query[d]});a.push({indicatorKey:l.sortByIndicator,value:(o=(n=this.internalProps.layoutMap.getIndicatorInfo(l.sortByIndicator))===null||n===void 0?void 0:n.title)!==null&&o!==void 0?o:l.sortByIndicator})}else a.push({dimensionKey:l.sortField,isPivotCorner:!0,value:l.sortField});const h=l.sortType?l.sortType.toUpperCase():"ASC";this.pivotSortState.push({dimensions:a,order:hi[h]})}}_parseColumnWidthConfig(t){for(let e=0;e<(t==null?void 0:t.length);e++){const n=t[e],o=n.dimensions,r=n.width,s=this.getCellAddressByHeaderPaths(o);s&&!this.internalProps._widthResizedColMap.has(s.col)&&(this._setColWidth(s.col,r),this.internalProps._widthResizedColMap.add(s.col))}}updatePivotSortState(t){this.pivotSortState=t}sort(t,e,n){var o;let r;if(this.isCornerHeader(t,e)){const a=this.getHeaderDefine(t,e);r=[];const h={isPivotCorner:!0,dimensionKey:a.value,value:a.value};r.push(h)}else r=this.isColumnHeader(t,e)?this.getCellHeaderPaths(t,e).colHeaderPaths:this.getCellHeaderPaths(t,e).rowHeaderPaths;const s=r[r.length-1].indicatorKey,l=this.getHeaderDefine(t,e);if(l.sort){if(this.dataset.sortRules){const a={};for(let h=this.dataset.sortRules.length-1;h>=0;h--){const d=this.dataset.sortRules[h];l.dimensionKey&&d.sortField===l.dimensionKey?(a[d.sortField]=d,this.dataset.sortRules.splice(h,1)):s&&d.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])&&this.dataset.sortRules.splice(h,1)}s?this.dataset.sortRules.push({sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:hi[n],sortByIndicator:s,query:r.reduce((h,d)=>(d.dimensionKey&&h.push(d.value),h),[])}):this.dataset.sortRules.push(Object.assign((o=a[l.dimensionKey])!==null&&o!==void 0?o:{},{sortField:l.dimensionKey,sortType:hi[n]}))}else this.dataset.sortRules=s?[{sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:hi[n],sortByIndicator:s,query:r.reduce((a,h)=>(h.dimensionKey&&a.push(h.value),a),[])}]:[{sortField:l.dimensionKey,sortType:hi[n]}];this.updateSortRules(this.dataset.sortRules,t,e)}}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const r=this.pivotSortState[o],s=r.dimensions,l=this.getCellAddressByHeaderPaths(s),a=r.order;if(l&&Vi(n,l.col,l.row))return a}}_moveHeaderPosition(t,e){const n=this.getCellRange(t.col,t.row),o=this.getCellRange(e.col,e.row),r=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(r){if(r.moveType==="column"){if(this.internalProps.recordsIsTwoDimensionalArray)for(let s=0;s<this.internalProps.records.length;s++){const l=this.internalProps.records[s].splice(r.sourceIndex-this.rowHeaderLevelCount,r.sourceSize);l.unshift(r.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[s],l)}this.colWidthsMap.exchangeOrder(n.start.col,n.end.col-n.start.col+1,o.start.col,o.end.col-o.start.col+1,r.targetIndex),this.setMinMaxLimitWidth()}else if(r.moveType==="row"){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.internalProps.records.splice(r.sourceIndex-this.columnHeaderLevelCount,r.sourceSize);s.unshift(r.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,s)}r.targetIndex>r.sourceIndex?this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex+r.sourceSize-r.targetSize,r.targetSize,r.targetIndex):this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex,r.targetSize,r.targetIndex)}return r}return null}toggleHierarchyState(t,e,n=!0){const o=this.getHierarchyState(t,e);if(o===Ot.expand)this._refreshHierarchyState(t,e,n),this.fireListeners(qo.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Ot.collapse});else if(o===Ot.collapse){const r=this.internalProps.layoutMap.getHeadNode(t,e);Array.isArray(r.children)&&this._refreshHierarchyState(t,e,n),this.fireListeners(qo.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Ot.expand,originData:r})}}_refreshHierarchyState(t,e,n=!0,o){let r=!1,s=!1;this.stateManager.updateHoverIcon(t,e,void 0,void 0);const l=this.internalProps.layoutMap.checkHasChart();l&&(this.autoFillWidth&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight));const a=this.internalProps.layoutMap.toggleHierarchyState(t,e);o&&o(),this.refreshRowColCount(),this.clearCellStyleCache(),this.scenegraph.updateHierarchyIcon(t,e),this.scenegraph.updateRow(a.removeCellPositions,a.addCellPositions,a.updateCellPositions,n),l&&(this.autoFillWidth&&!r&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&!s&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight),(this.widthMode==="adaptive"||r||this.heightMode==="adaptive"||s)&&this.scenegraph.updateChartSizeForResizeColWidth(-1))}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}setRecords(t){var e,n,o,r,s;const l={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t,this.internalProps.recordsIsTwoDimensionalArray=!1,((e=t==null?void 0:t[0])===null||e===void 0?void 0:e.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0);const a=this.options,h=this.internalProps;if(((n=this.options.customConfig)===null||n===void 0?void 0:n.enableDataAnalysis)===!1)this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new nv({rows:h.layoutMap.fullRowDimensionKeys,columns:h.layoutMap.colDimensionKeys,indicators:h.layoutMap.indicatorKeys,indicatorsAsCol:h.layoutMap.indicatorsAsCol,indicatorDimensionKey:h.layoutMap.indicatorDimensionKey},t));else{let d,u;this.dataset.setRecords(t),d=a.columnTree?h.layoutMap.columnDimensionTree:new Me((o=this.dataset.colHeaderTree)!==null&&o!==void 0?o:[],this.layoutNodeId),u=a.rowTree?h.layoutMap.rowDimensionTree:new Me((r=this.dataset.rowHeaderTree)!==null&&r!==void 0?r:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(s=this.options.rowExpandLevel)!==null&&s!==void 0?s:1:void 0),h.layoutMap=new Jo(this,this.dataset,d,u),this.pivotSortState=[],a.pivotSortState&&(this.pivotSortState=a.pivotSortState)}if(this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(l.col,l.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder(),this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const d=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new d(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}}startEditCell(t,e,n){var o;if(z(t)&&z(e))this.eventManager.isDraging=!1,this.selectCell(t,e),this.editorManager.startEditCell(t,e,n);else if(!((o=this.stateManager.select)===null||o===void 0)&&o.cellPos){const{col:r,row:s}=this.stateManager.select.cellPos;z(r)&&z(s)&&this.editorManager.startEditCell(r,s,n)}}completeEditCell(){this.editorManager.completeEdit()}getEditor(t,e){var n,o,r;let s;if(this.isCornerHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(n=l==null?void 0:l.headerEditor)!==null&&n!==void 0?n:this.options.headerEditor}else if(this.isHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(o=l==null?void 0:l.headerEditor)!==null&&o!==void 0?o:this.options.headerEditor}else{const l=this.getBodyColumnDefine(t,e);s=(r=l==null?void 0:l.editor)!==null&&r!==void 0?r:this.options.editor}return typeof s=="function"&&(s=s({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),typeof s=="string"?DA(s):s}isHasEditorDefine(t,e){var n;const o=this.getBodyColumnDefine(t,e);let r=(n=o==null?void 0:o.editor)!==null&&n!==void 0?n:this.options.editor;return typeof r=="function"&&(r=r({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),z(r)}changeCellValue(t,e,n,o=!1){if(o&&this.isHasEditorDefine(t,e)||o===!1){let r=n;const s=this.getCellOriginValue(t,e),l=this.getCellRawValue(t,e);typeof l=="number"&&X0(n)&&(r=parseFloat(n)),this._changeCellValueToDataSet(t,e,s,r);const a=this.getCellRange(t,e);for(let h=a.start.col;h<=a.end.col;h++)for(let d=a.start.row;d<=a.end.row;d++)this.scenegraph.updateCellContent(h,d);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else if(!this.internalProps._widthResizedColMap.has(t)){const h=this.getColWidth(t),d=Ar(t,0,this.rowCount-1,this,!1);d!==h&&this.scenegraph.updateColWidth(t,d-h)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.internalProps._heightResizedRowMap.size===0&&this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"&&!this.internalProps._heightResizedRowMap.has(e)){const h=this.getRowHeight(e),d=Qi(e,0,this.colCount-1,this);this.scenegraph.updateRowHeight(e,d-h)}this.fireListeners(nt.CHANGE_CELL_VALUE,{col:t,row:e,rawValue:l,currentValue:s,changedValue:r}),this.scenegraph.updateNextFrame()}}changeCellValues(t,e,n,o=!1){let r=t,s=e;const l=[],a=[];for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){const c=n[u],g=[],f=[];l.push(g),a.push(f);for(let p=0;p<c.length&&!(t+p>this.colCount-1);p++){const m=this.getCellRawValue(t+p,e+u);g.push(m);const v=this.getCellOriginValue(t+p,e+u);f.push(v)}}for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){s=e+u;const c=n[u];let g=t;for(let f=0;f<c.length&&!(t+f>this.colCount-1);f++)if(g=t+f,o&&this.isHasEditorDefine(t+f,e+u)||o===!1){const p=c[f];let m=p;const v=a[u][f],C=l[u][f];typeof C=="number"&&X0(p)&&(m=parseFloat(p)),this._changeCellValueToDataSet(t+f,e+u,v,m),this.fireListeners(nt.CHANGE_CELL_VALUE,{col:t+f,row:e+u,rawValue:C,currentValue:v,changedValue:this.getCellOriginValue(t+f,e+u)})}r=Math.max(r,g)}const h=this.getCellRange(t,e),d=this.getCellRange(r,s);for(let u=h.start.col;u<=d.end.col;u++)for(let c=h.start.row;c<=d.end.row;c++)this.scenegraph.updateCellContent(u,c);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else for(let u=t;u<=d.end.col;u++)if(!this.internalProps._widthResizedColMap.has(u)){const c=this.getColWidth(u),g=Ar(u,0,this.rowCount-1,this,!1);g!==c&&this.scenegraph.updateColWidth(u,g-c)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"){const u=[],c=[];for(let g=e;g<=d.end.row;g++)if(this.rowHeightsMap.get(g)){const f=this.getRowHeight(g),p=Qi(g,0,this.colCount-1,this);u.push(g),c.push(p-f)}this.scenegraph.updateRowsHeight(u,c)}this.scenegraph.updateNextFrame()}_changeCellValueToDataSet(t,e,n,o){var r,s,l,a,h,d,u,c;if(this.internalProps.recordsIsTwoDimensionalArray){const g=this.getBodyIndexByRow(e),f=this.getBodyIndexByCol(t);this.records[g][f]=o}else if(this.dataset){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isCornerHeader(t,e))this.internalProps.layoutMap.changeCornerTitle(t,e,o);else if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.dataset.changeRecordFieldValue(!((r=g.colHeaderPaths)===null||r===void 0)&&r.length?(s=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&s!==void 0?s:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(l=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&l!==void 0?l:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=(a=g.colHeaderPaths)===null||a===void 0?void 0:a.filter(m=>!m.virtual).map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),p=(h=g.rowHeaderPaths)===null||h===void 0?void 0:h.filter(m=>!m.virtual).map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value});this.dataset.changeTreeNodeValue(this.internalProps.layoutMap.indicatorsAsCol?p:p.slice(0,-1),this.internalProps.layoutMap.indicatorsAsCol?f.slice(0,-1):f,this.internalProps.layoutMap.getIndicatorKey(t,e),o)}}else if(this.flatDataToObjects){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.flatDataToObjects.changeRecordFieldValue(!((d=g.colHeaderPaths)===null||d===void 0)&&d.length?(u=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&u!==void 0?u:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(c=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&c!==void 0?c:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=g.colHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),p=g.rowHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value});this.flatDataToObjects.changeTreeNodeValue(p,f,this.internalProps.layoutMap.getBody(t,e).indicatorKey,o)}}}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}setTreeNodeChildren(t,e,n,o){this.flatDataToObjects?(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.flatDataToObjects.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey}),this.flatDataToObjects.addRecords(e)})):(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.dataset._rowTreeHasChanged(),this.dataset.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys}),this.dataset.addRecords(e)}))}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),this.renderWithRecreateCells()}getFilteredRecords(){var t;return(t=this.dataset)===null||t===void 0?void 0:t.filterRules}};vg(),bg(),Cg(),yg(),_g(),wg(),Sg(),xg(),Rg(),Ag(),Tg(),Mg(),Al(),Bg();class aT extends lT{}Al();class p9 extends lT{}vg(),bg(),Cg(),yg(),_g(),wg(),Sg(),xg(),Rg(),Ag(),Tg(),Mg(),Al(),Bg();let m9=class extends ag{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_;let y,w;Qt.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},this._selectedDataItemsInChart=[],this._selectedDimensionInChart=[],this._chartEventMap={},e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Pe(e.columns),this.internalProps.rows=Pe(e.rows),this.internalProps.indicators=io(e.indicators),this.internalProps.columnTree=!e.indicatorsAsCol||!((n=e.columns)===null||n===void 0)&&n.length||e.columnTree?Pe(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((o=e.rows)===null||o===void 0)&&o.length||e.rowTree?Pe(e.rowTree):[],this.internalProps.records=e.records,this.setCustomStateNameToSpec(),this.internalProps.columnResizeType=(r=e.columnResizeType)!==null&&r!==void 0?r:"column",this.internalProps.rowResizeType=(s=e.rowResizeType)!==null&&s!==void 0?s:"row",this.internalProps.dataConfig={isPivotChart:!0},this._axes=it(e.axes)?e.axes:[],e.columnTree&&(e.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Li(this.internalProps.columnTree,e.indicators)),y=new Me((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),e.rowTree&&(e.indicatorsAsCol===!1&&(this.internalProps.rowTree=Li(this.internalProps.rowTree,e.indicators)),w=new Me((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const A=!((h=w==null?void 0:w.dimensionKeys)===null||h===void 0)&&h.count?w.dimensionKeys.valueArr():(u=(d=e.rows)===null||d===void 0?void 0:d.reduce((M,T)=>(typeof T=="string"?M.push(T):M.push(T.dimensionKey),M),[]))!==null&&u!==void 0?u:[],R=!((c=y==null?void 0:y.dimensionKeys)===null||c===void 0)&&c.count?y.dimensionKeys.valueArr():(f=(g=e.columns)===null||g===void 0?void 0:g.reduce((M,T)=>(typeof T=="string"?M.push(T):M.push(T.dimensionKey),M),[]))!==null&&f!==void 0?f:[],x=(m=(p=e.indicators)===null||p===void 0?void 0:p.reduce((M,T)=>(typeof T=="string"?M.push(T):M.push(T.indicatorKey),M),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(R,A),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new xh(this.internalProps.dataConfig,A,R,x,this.internalProps.indicators,(v=e.indicatorsAsCol)===null||v===void 0||v,e.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&_h(this.internalProps.indicators)){const M=T=>{T.forEach(B=>{var H;!((H=B.children)===null||H===void 0)&&H.length?M(B.children):B.children=[{dimensionKey:"axis",value:""}]})};!((C=this.dataset.rowHeaderTree)===null||C===void 0)&&C.length?M(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(e.columnTree||e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,e.indicators)),e.rowTree||e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,e.indicators)),y=new Me((S=this.dataset.colHeaderTree)!==null&&S!==void 0?S:[],this.layoutNodeId),w=new Me((_=this.dataset.rowHeaderTree)!==null&&_!==void 0?_:[],this.layoutNodeId),this.internalProps.layoutMap=new Jo(this,this.dataset,y,w),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(),e.title){const M=Bt.getComponent("title");this.internalProps.title=new M(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const M=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new M(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(nt.INITIALIZED,null)},0)}static get EVENT_TYPE(){return iA}get pivotChartAxes(){return this._axes}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!0}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n&&!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y;const w=this.internalProps;let A,R;super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Pe(t.columns),this.internalProps.rows=Pe(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?io(t.indicators):[],this.internalProps.columnTree=!t.indicatorsAsCol||!((n=t.columns)===null||n===void 0)&&n.length||t.columnTree?Pe(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((o=t.rows)===null||o===void 0)&&o.length||t.rowTree?Pe(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.setCustomStateNameToSpec(),this._selectedDataItemsInChart=[],w.columnResizeType=(r=t.columnResizeType)!==null&&r!==void 0?r:"column",w.rowResizeType=(s=t.rowResizeType)!==null&&s!==void 0?s:"row",w.dataConfig={isPivotChart:!0},this._axes=it(t.axes)?t.axes:[],t.columnTree&&(t.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Li(this.internalProps.columnTree,t.indicators)),A=new Me((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),t.rowTree&&(t.indicatorsAsCol===!1&&(this.internalProps.rowTree=Li(this.internalProps.rowTree,t.indicators)),R=new Me((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const x=!((h=R==null?void 0:R.dimensionKeys)===null||h===void 0)&&h.count?R.dimensionKeys.valueArr():(u=(d=t.rows)===null||d===void 0?void 0:d.reduce((B,H)=>(typeof H=="string"?B.push(H):B.push(H.dimensionKey),B),[]))!==null&&u!==void 0?u:[],M=!((c=A==null?void 0:A.dimensionKeys)===null||c===void 0)&&c.count?A.dimensionKeys.valueArr():(f=(g=t.columns)===null||g===void 0?void 0:g.reduce((B,H)=>(typeof H=="string"?B.push(H):B.push(H.dimensionKey),B),[]))!==null&&f!==void 0?f:[],T=(m=(p=t.indicators)===null||p===void 0?void 0:p.reduce((B,H)=>(typeof H=="string"?B.push(H):B.push(H.indicatorKey),B),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(M,x),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new xh(this.internalProps.dataConfig,x,M,T,this.internalProps.indicators,(v=t.indicatorsAsCol)===null||v===void 0||v,(C=t.records)!==null&&C!==void 0?C:this.internalProps.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&_h(this.internalProps.indicators)){const B=H=>{H.forEach(k=>{var P;!((P=k.children)===null||P===void 0)&&P.length?B(k.children):k.children=[{dimensionKey:"axis",value:""}]})};!((S=this.dataset.rowHeaderTree)===null||S===void 0)&&S.length?B(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(t.columnTree||t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,t.indicators)),t.rowTree||t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,t.indicators)),A=new Me((_=this.dataset.colHeaderTree)!==null&&_!==void 0?_:[],this.layoutNodeId),R=new Me((y=this.dataset.rowHeaderTree)!==null&&y!==void 0?y:[],this.layoutNodeId),w.layoutMap=new Jo(this,this.dataset,A,R),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,w.releaseList&&(w.releaseList.forEach(B=>{var H;return(H=B==null?void 0:B.release)===null||H===void 0?void 0:H.call(B)}),w.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const B=Bt.getComponent("title");this.internalProps.title=new B(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const B=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new B(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(B=>{setTimeout(B,0)})}updatePagination(){}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a;const h=this,{layoutMap:d}=h.internalProps;d&&(h.colCount=(t=d.colCount)!==null&&t!==void 0?t:0,h.rowCount=(e=d.rowCount)!==null&&e!==void 0?e:0,h.internalProps.frozenColCount=(n=d.rowHeaderLevelCount)!==null&&n!==void 0?n:0,h.frozenRowCount=Math.max(d.headerLevelCount,(o=this.options.frozenRowCount)!==null&&o!==void 0?o:0),h.bottomFrozenRowCount!==((r=d==null?void 0:d.bottomFrozenRowCount)!==null&&r!==void 0?r:0)&&(h.bottomFrozenRowCount=(s=d==null?void 0:d.bottomFrozenRowCount)!==null&&s!==void 0?s:0),h.rightFrozenColCount!==((l=d==null?void 0:d.rightFrozenColCount)!==null&&l!==void 0?l:0)&&(h.rightFrozenColCount=(a=d==null?void 0:d.rightFrozenColCount)!==null&&a!==void 0?a:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r&&this.syncHierarchyState(t.children[s],r)}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getCellValue(t,e,n){var o,r,s;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const g=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let f;return g==null||g.forEach(p=>{const m=this.internalProps.layoutMap.getIndicatorInfo(p);m&&(f=m)}),(r=(o=f==null?void 0:f.title)!==null&&o!==void 0?o:f==null?void 0:f.indicatorKey)!==null&&r!==void 0?r:""}const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.dataset){let u;const c=this.internalProps.layoutMap.getCellHeaderPaths(t,e),g=c.colHeaderPaths.map((m,v)=>{var C;return m.indicatorKey&&(u={position:"col",index:v}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),f=c.rowHeaderPaths.map((m,v)=>{var C;return m.indicatorKey&&(u={position:"row",index:v}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,u);return p.value?p.value():void 0}const{fieldFormat:l}=this.internalProps.layoutMap.getBody(t,e),a=this.getBodyIndexByRow(e),h=this.getBodyIndexByCol(t),d=(s=this.records[a])===null||s===void 0?void 0:s[h];return typeof l=="function"?l(d,t,e,this):d}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const d=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let u;return d==null||d.forEach(c=>{const g=this.internalProps.layoutMap.getIndicatorInfo(c);g&&(u=g)}),(o=(n=u==null?void 0:u.title)!==null&&n!==void 0?n:u==null?void 0:u.indicatorKey)!==null&&o!==void 0?o:""}const{title:h}=s.internalProps.layoutMap.getHeader(t,e);return typeof h=="function"?h():h}if(this.dataset){let h;const d=this.internalProps.layoutMap.getCellHeaderPaths(t,e),u=d.colHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"col",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),c=d.rowHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"row",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),g=this.dataset.getAggregator(c,u,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,h);return g.value?g.value():void 0}const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(r=this.records[l])===null||r===void 0?void 0:r[a]}getCellRawValue(t,e){return this.getCellOriginValue(t,e)}getCellOriginRecord(t,e){if(!this.internalProps.layoutMap.isHeader(t,e)&&this.dataset){let n;const o=this.internalProps.layoutMap.getCellHeaderPaths(t,e),r=o.colHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"col",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value}),s=o.rowHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"row",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value});return this.dataset.getAggregator(s,r,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,n).records}}getCellRawRecord(t,e){return this.getCellOriginRecord(t,e)}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const{col:r,row:s,order:l}=this.pivotSortState[o];if(Vi(n,r,s))return l}}_moveHeaderPosition(t,e){var n,o,r,s;const l=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(l){if(l.moveType==="column"){if(((o=(n=this.options.records)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.constructor)===Array)for(let a=0;a<this.internalProps.records.length;a++){const h=this.internalProps.records[a].splice(l.sourceIndex-this.rowHeaderLevelCount,l.sourceSize);h.unshift(l.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[a],h)}this.colWidthsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize),this.setMinMaxLimitWidth()}else if(l.moveType==="row"){if(((s=(r=this.options.records)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.constructor)===Array){const a=this.internalProps.records.splice(l.sourceIndex-this.columnHeaderLevelCount,l.sourceSize);a.unshift(l.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,a)}this.rowHeightsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize)}return l}return null}toggleHierarchyState(t,e,n=!0){}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}_generateCollectValuesConfig(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S;t=t.filter(w=>w!==ji),e=e.filter(w=>w!==ji);const _=this.internalProps.indicators,y={};for(let w=0,A=_==null?void 0:_.length;w<A;w++)if(typeof _[w]!="string"&&_[w].chartSpec){if(((n=_[w].chartSpec)===null||n===void 0?void 0:n.type)==="pie"||((o=_[w].chartSpec)===null||o===void 0?void 0:o.type)==="rose"||((r=_[w].chartSpec)===null||r===void 0?void 0:r.type)==="radar"||((s=_[w].chartSpec)===null||s===void 0?void 0:s.type)==="gauge"||((l=_[w].chartSpec)===null||l===void 0?void 0:l.type)==="wordCloud")continue;const R=_[w],x=R.chartSpec;if(this.options.indicatorsAsCol===!1)if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[R.indicatorKey]={by:e,range:!0,sumBy:(x==null?void 0:x.stack)&&t.concat(x==null?void 0:x.xField)},x.series)x.series.forEach(M=>{var T,B,H,k,P,E,F,I,L,D,O,V,W,j;const $=typeof M.xField=="string"?M.xField:M.xField[0];y[$]={by:t,type:M.direction!=="horizontal"?"xField":void 0,range:fs(M,this._axes,M.direction==="horizontal",!0),sortBy:M.direction!=="horizontal"?(k=(H=(B=(T=M==null?void 0:M.data)===null||T===void 0?void 0:T.fields)===null||B===void 0?void 0:B[$])===null||H===void 0?void 0:H.domain)!==null&&k!==void 0?k:(F=(E=(P=x==null?void 0:x.data)===null||P===void 0?void 0:P.fields)===null||E===void 0?void 0:E[$])===null||F===void 0?void 0:F.domain:void 0};const X=M.yField;M.stack!==!1&&(M.type==="bar"||M.type==="area")&&(M.stack=!0),y[X]={by:e,range:fs(M,this._axes,M.direction==="horizontal",!1),sumBy:M.stack&&t.concat(M==null?void 0:M.xField),sortBy:M.direction==="horizontal"?(O=(D=(L=(I=M==null?void 0:M.data)===null||I===void 0?void 0:I.fields)===null||L===void 0?void 0:L[X])===null||D===void 0?void 0:D.domain)!==null&&O!==void 0?O:(j=(W=(V=x==null?void 0:x.data)===null||V===void 0?void 0:V.fields)===null||W===void 0?void 0:W[X])===null||j===void 0?void 0:j.domain:void 0,extendRange:pc(x.markLine)}});else{const M=typeof x.xField=="string"?x.xField:x.xField[0];y[M]={by:t,type:x.direction!=="horizontal"?"xField":void 0,range:fs(x,this._axes,x.direction==="horizontal",!0),sortBy:x.direction!=="horizontal"?(d=(h=(a=x==null?void 0:x.data)===null||a===void 0?void 0:a.fields)===null||h===void 0?void 0:h[M])===null||d===void 0?void 0:d.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const T=x.yField;y[T]={by:e,range:x.direction!=="horizontal",sumBy:x.stack&&t.concat(x==null?void 0:x.xField),sortBy:x.direction==="horizontal"?(g=(c=(u=x==null?void 0:x.data)===null||u===void 0?void 0:u.fields)===null||c===void 0?void 0:c[T])===null||g===void 0?void 0:g.domain:void 0,extendRange:pc(x.markLine)}}else{const M=_[w];if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[M.indicatorKey]={by:t,range:!0,sumBy:(x==null?void 0:x.stack)&&e.concat(x==null?void 0:x.yField)},x.series)x.series.forEach(T=>{var B,H,k,P,E,F,I,L,D,O,V,W,j,$;const X=typeof T.yField=="string"?T.yField:T.yField[0];y[X]={by:e,type:T.direction==="horizontal"?"yField":void 0,range:fs(T,this._axes,T.direction==="horizontal",!1),sortBy:T.direction==="horizontal"?(P=(k=(H=(B=T==null?void 0:T.data)===null||B===void 0?void 0:B.fields)===null||H===void 0?void 0:H[X])===null||k===void 0?void 0:k.domain)!==null&&P!==void 0?P:(I=(F=(E=x==null?void 0:x.data)===null||E===void 0?void 0:E.fields)===null||F===void 0?void 0:F[X])===null||I===void 0?void 0:I.domain:void 0};const K=T.xField;T.stack!==!1&&(T.type==="bar"||T.type==="area")&&(T.stack=!0),y[K]={by:t,range:fs(T,this._axes,T.direction==="horizontal",!0),sumBy:T.stack&&e.concat(T==null?void 0:T.yField),sortBy:T.direction!=="horizontal"?(V=(O=(D=(L=T==null?void 0:T.data)===null||L===void 0?void 0:L.fields)===null||D===void 0?void 0:D[K])===null||O===void 0?void 0:O.domain)!==null&&V!==void 0?V:($=(j=(W=x==null?void 0:x.data)===null||W===void 0?void 0:W.fields)===null||j===void 0?void 0:j[K])===null||$===void 0?void 0:$.domain:void 0,extendRange:pc(x.markLine)}});else{const T=typeof x.yField=="string"?x.yField:x.yField[0];y[T]={by:e,type:x.direction==="horizontal"?"yField":void 0,range:fs(x,this._axes,x.direction==="horizontal",!1),sortBy:x.direction==="horizontal"?(m=(p=(f=x==null?void 0:x.data)===null||f===void 0?void 0:f.fields)===null||p===void 0?void 0:p[T])===null||m===void 0?void 0:m.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const B=x.xField;y[B]={by:t,range:fs(x,this._axes,x.direction==="horizontal",!0),sumBy:x.stack&&e.concat(x==null?void 0:x.yField),sortBy:x.direction!=="horizontal"?(S=(C=(v=x==null?void 0:x.data)===null||v===void 0?void 0:v.fields)===null||C===void 0?void 0:C[B])===null||S===void 0?void 0:S.domain:void 0,extendRange:pc(x.markLine)}}}}return y}_generateAggregationRules(){var t;const e=[];return(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:It.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=this.options.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:It.RECORD})}else{const s=this.options.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:It.RECORD})}}),e}setCustomStateNameToSpec(){var t;const e=n=>{var o,r,s,l,a,h,d,u,c,g;!((r=(o=n.bar)===null||o===void 0?void 0:o.state)===null||r===void 0)&&r.selected&&(n.bar.state.vtable_selected=n.bar.state.selected,n.bar.state.vtable_selected_reverse=n.bar.state.selected_reverse,delete n.bar.state.selected,delete n.bar.state.selected_reverse),!((l=(s=n.point)===null||s===void 0?void 0:s.state)===null||l===void 0)&&l.selected&&(n.point.state.vtable_selected=n.point.state.selected,n.point.state.vtable_selected_reverse=n.point.state.selected_reverse,delete n.point.state.selected,delete n.point.state.selected_reverse),!((h=(a=n.line)===null||a===void 0?void 0:a.state)===null||h===void 0)&&h.selected&&(n.line.state.vtable_selected=n.line.state.selected,n.line.state.vtable_selected_reverse=n.line.state.selected_reverse,delete n.line.state.selected,delete n.line.state.selected_reverse),!((u=(d=n.area)===null||d===void 0?void 0:d.state)===null||u===void 0)&&u.selected&&(n.area.state.vtable_selected=n.area.state.selected,n.area.state.vtable_selected_reverse=n.area.state.selected_reverse,delete n.area.state.selected,delete n.area.state.selected_reverse),!((g=(c=n.pie)===null||c===void 0?void 0:c.state)===null||g===void 0)&&g.selected&&(n.pie.state.vtable_selected=n.pie.state.selected,n.pie.state.vtable_selected_reverse=n.pie.state.selected_reverse,delete n.pie.state.selected,delete n.pie.state.selected_reverse)};(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{if(n.chartSpec){const o=n.chartSpec;o.series?o.series.forEach(r=>{e(r)}):e(o)}})}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),ph(this.scenegraph),r6(this.scenegraph),this.render()}clearChartCacheImage(t,e){at(t)&&at(e)?o6(t,e,this.scenegraph):ph(this.scenegraph)}getLegendSelected(){var t;const e=[];return(t=this.internalProps.legends)===null||t===void 0||t.forEach(n=>{const o=n.legendComponent._getSelectedLegends().map(r=>r.label);e.push(...o)}),e}setLegendSelected(t){var e;(e=this.internalProps.legends)===null||e===void 0||e.forEach(n=>{n.legendComponent.setSelected(t)})}getChartDatumPosition(t,e){const{chartInstance:n,bounds:o}=this.getChartInstance(e);if(n){const r=n.convertDatumToPosition(t);return r?{x:Math.round(r.x+o.x1),y:Math.round(r.y+o.y1)}:null}return null}getCellAddressByRecord(t){const e=[],n=[],o={},r=[];this.dataset.dataConfig.aggregationRules.forEach(s=>{if(typeof s.field=="string")o[s.field]=s.indicatorKey,r.push(s.field);else for(let l=0;l<s.field.length;l++)o[s.field[l]]=s.indicatorKey,r.push(s.field[l])});for(const s in t)this.dataset.rows.indexOf(s)>=0&&e.push({dimensionKey:s,value:t[s]}),this.dataset.columns.indexOf(s)>=0&&n.push({dimensionKey:s,value:t[s]}),r.indexOf(s)>=0&&(this.dataset.indicatorsAsCol?n.push({indicatorKey:o[s]}):e.push({indicatorKey:o[s]}));return this.getCellAddressByHeaderPaths({rowHeaderPaths:e,colHeaderPaths:n,cellLocation:"body"})}getChartInstance(t){var e,n,o,r,s;const l=this.getCellAddressByHeaderPaths(t);if(l){const a=this.getCellRelativeRect(l.col,l.row),h=this.scenegraph.getCell(l.col,l.row);let d;const u=(e=h==null?void 0:h.getChildren())===null||e===void 0?void 0:e[0];if(u.attribute.chartInstance){d=u.attribute.chartInstance;const{dataId:c,data:g,axes:f,spec:p}=u.attribute,m=u.getViewBox();if(f==null||f.forEach((v,C)=>{var S,_,y,w;v.type==="linear"?d.updateModelSpecSync({type:"axes",index:C},{min:(_=(S=v.range)===null||S===void 0?void 0:S.min)!==null&&_!==void 0?_:0,max:(w=(y=v.range)===null||y===void 0?void 0:y.max)!==null&&w!==void 0?w:0},!0):v.type==="band"&&d.updateModelSpec({type:"axes",index:C},{domain:v.domain.slice(0)},!0)}),d.updateViewBox({x1:m.x1-u.getRootNode().table.scrollLeft,x2:m.x2-u.getRootNode().table.scrollLeft,y1:m.y1-u.getRootNode().table.scrollTop,y2:m.y2-u.getRootNode().table.scrollTop},!1,!1),typeof c=="string")d.updateDataSync(c,g??[]);else{const v=[];for(const C in c){const S=c[C],_=p.series.find(y=>{var w;return((w=y==null?void 0:y.data)===null||w===void 0?void 0:w.id)===C});v.push({id:C,values:S?(n=g==null?void 0:g.filter(y=>y.hasOwnProperty(S)))!==null&&n!==void 0?n:[]:g??[],fields:(o=_==null?void 0:_.data)===null||o===void 0?void 0:o.fields}),d.updateFullDataSync||d.updateDataSync(C,S?(r=g==null?void 0:g.filter(y=>y.hasOwnProperty(S)))!==null&&r!==void 0?r:[]:g??[])}(s=d.updateFullDataSync)===null||s===void 0||s.call(d,v)}this.renderAsync()}return{chartInstance:d,bounds:a.bounds}}return{}}_getDimensionSortArray(){var t,e;if(!((e=(t=this.options)===null||t===void 0?void 0:t.axes)===null||e===void 0)&&e.length){const n=this.options.indicatorsAsCol?"left":"bottom",o=this.options.axes.find(r=>r.orient===n);if(o&&it(o.domain))return o.domain}}setRecords(t){var e,n;const o={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t;const r=this.options,s=this.internalProps;let l,a;this.dataset.setRecords(t),l=r.columnTree?s.layoutMap.columnDimensionTree:new Me((e=this.dataset.colHeaderTree)!==null&&e!==void 0?e:[],this.layoutNodeId),a=r.rowTree?s.layoutMap.rowDimensionTree:new Me((n=this.dataset.rowHeaderTree)!==null&&n!==void 0?n:[],this.layoutNodeId),s.layoutMap=new Jo(this,this.dataset,l,a),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(o.col,o.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder()}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}};class v9 extends Op{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class hT extends hn{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p;t.direction&&(t.flexDirection=t.direction),!t.justifyContent||t.justifyContent!=="start"&&t.justifyContent!=="end"||(t.justifyContent="flex-"+t.justifyContent),!t.alignItems||t.alignItems!=="start"&&t.alignItems!=="end"||(t.alignItems="flex-"+t.alignItems),!t.alignContent||t.alignContent!=="start"&&t.alignContent!=="end"||(t.alignContent="flex-"+t.alignContent),t.display="flex",t.flexDirection||(t.flexDirection="row"),t.clip=!0,t.fill=(e=t==null?void 0:t.background)===null||e===void 0?void 0:e.fill,t.stroke=(n=t==null?void 0:t.background)===null||n===void 0?void 0:n.stroke,t.lineWidth=(o=t==null?void 0:t.background)===null||o===void 0?void 0:o.lineWidth,t.cornerRadius=(r=t==null?void 0:t.background)===null||r===void 0?void 0:r.cornerRadius;const m=it(t.boundsPadding),v=[(l=(s=t.marginTop)!==null&&s!==void 0?s:m?t.boundsPadding[0]:t.boundsPadding)!==null&&l!==void 0?l:0,(h=(a=t.marginRight)!==null&&a!==void 0?a:m?t.boundsPadding[1]:t.boundsPadding)!==null&&h!==void 0?h:0,(c=(d=t.marginBottom)!==null&&d!==void 0?d:m?(u=t.boundsPadding[2])!==null&&u!==void 0?u:t.boundsPadding[0]:t.boundsPadding)!==null&&c!==void 0?c:0,(p=(g=t.marginLeft)!==null&&g!==void 0?g:m?(f=t.boundsPadding[3])!==null&&f!==void 0?f:t.boundsPadding[1]:t.boundsPadding)!==null&&p!==void 0?p:0];t.boundsPadding=v,super(t)}}class b9 extends hT{constructor(t){t.flexWrap="nowrap",super(t)}}let C9=class extends Do{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g;let f;re(t.iconName)&&(f=fn()[t.iconName],f&&(t.width=(e=t.width)!==null&&e!==void 0?e:f.width,t.height=(n=t.height)!==null&&n!==void 0?n:f.height,t.svg=f.svg,t.cursor=f.cursor)),t.svg&&(t.image=t.svg);const p=it(t.boundsPadding),m=[(r=(o=t.marginTop)!==null&&o!==void 0?o:p?t.boundsPadding[0]:t.boundsPadding)!==null&&r!==void 0?r:0,(l=(s=t.marginRight)!==null&&s!==void 0?s:p?t.boundsPadding[1]:t.boundsPadding)!==null&&l!==void 0?l:0,(d=(a=t.marginBottom)!==null&&a!==void 0?a:p?(h=t.boundsPadding[2])!==null&&h!==void 0?h:t.boundsPadding[0]:t.boundsPadding)!==null&&d!==void 0?d:0,(g=(u=t.marginLeft)!==null&&u!==void 0?u:p?(c=t.boundsPadding[3])!==null&&c!==void 0?c:t.boundsPadding[1]:t.boundsPadding)!==null&&g!==void 0?g:0];t.boundsPadding=m,super(t),this.cache=f}},y9=class extends Do{constructor(t){var e,n,o,r,s,l,a,h,d,u;t.src&&(t.image=t.src),t.shape==="circle"&&(t.cornerRadius=t.width/2);const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}};class _9 extends eu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class w9 extends Si{constructor(t){var e,n,o,r,s,l,a,h,d,u,c;t.textBaseline||(t.textBaseline="top");const g=it(t.boundsPadding),f=[(n=(e=t.marginTop)!==null&&e!==void 0?e:g?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:g?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:g?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:g?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=f,t.fill=(c=t.fill)!==null&&c!==void 0?c:"#000",super(t)}getSize(t){this.AABBBounds.width()}}function S9(i,t=0){return{percent:i,delta:t}}class x9 extends nu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class R9 extends Pa{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}getSize(t){this.AABBBounds.width()}}class A9 extends hn{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}const T9=Object.freeze(Object.defineProperty({__proto__:null,Arc:x9,CheckBox:mr,Circle:v9,Container:hT,Group:A9,GroupElement:b9,Icon:C9,Image:y9,Line:$p,Radio:Na,Rect:_9,Tag:R9,Text:w9,percentCalc:S9},Symbol.toStringTag,{value:"Module"}));function M9(i){var t,e,n,o,r,s,l,a,h,d,u;const c={seqId:0},g={isPivotChart:!0};let f,p,m,v;i.columnTree&&(i.indicatorsAsCol!==!1&&(m=Li(i.columnTree,i.indicators)),f=new Me((t=i.columnTree)!==null&&t!==void 0?t:[],c)),i.rowTree&&(i.indicatorsAsCol===!1&&(v=Li(i.rowTree,i.indicators)),p=new Me((e=i.rowTree)!==null&&e!==void 0?e:[],c));const C=!((n=p.dimensionKeys)===null||n===void 0)&&n.count?p.dimensionKeys.valueArr():(r=(o=i.rows)===null||o===void 0?void 0:o.reduce((y,w)=>(typeof w=="string"?y.push(w):y.push(w.dimensionKey),y),[]))!==null&&r!==void 0?r:[],S=!((s=f.dimensionKeys)===null||s===void 0)&&s.count?f.dimensionKeys.valueArr():(a=(l=i.columns)===null||l===void 0?void 0:l.reduce((y,w)=>(typeof w=="string"?y.push(w):y.push(w.dimensionKey),y),[]))!==null&&a!==void 0?a:[],_=(d=(h=i.indicators)===null||h===void 0?void 0:h.reduce((y,w)=>(typeof w=="string"?y.push(w):y.push(w.indicatorKey),y),[]))!==null&&d!==void 0?d:[];return g.collectValuesBy=B9(i,S,C),g.aggregationRules=P9(i),{dataset:new xh(g,C,S,_,i.indicators,(u=i.indicatorsAsCol)===null||u===void 0||u,i.records,void 0,m||i.columnTree,v||i.rowTree,!0),columnDimensionTree:f,rowDimensionTree:p,layoutNodeId:c}}function B9(i,t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R,x;const M={};for(let T=0,B=(n=i.indicators)===null||n===void 0?void 0:n.length;T<B;T++)if(typeof i.indicators[T]!="string"&&i.indicators[T].chartSpec)if(i.indicatorsAsCol===!1){const H=i.indicators[T];if(M[H.indicatorKey]={by:e,range:!0,sumBy:((o=H.chartSpec)===null||o===void 0?void 0:o.stack)!==!1&&t.concat((r=H.chartSpec)===null||r===void 0?void 0:r.xField)},H.chartSpec.series)H.chartSpec.series.forEach(k=>{var P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt;const pt=typeof k.xField=="string"?k.xField:k.xField[0];M[pt]={by:t,type:k.direction!=="horizontal"?"xField":void 0,range:k.direction==="horizontal",sortBy:k.direction!=="horizontal"?(I=(F=(E=(P=k==null?void 0:k.data)===null||P===void 0?void 0:P.fields)===null||E===void 0?void 0:E[pt])===null||F===void 0?void 0:F.domain)!==null&&I!==void 0?I:(V=(O=(D=(L=H.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[pt])===null||V===void 0?void 0:V.domain:void 0};const xt=k.yField;M[xt]={by:e,range:k.direction!=="horizontal",sumBy:k.stack!==!1&&t.concat(k==null?void 0:k.xField),sortBy:k.direction==="horizontal"?(X=($=(j=(W=k==null?void 0:k.data)===null||W===void 0?void 0:W.fields)===null||j===void 0?void 0:j[xt])===null||$===void 0?void 0:$.domain)!==null&&X!==void 0?X:(dt=(Q=(U=(K=H.chartSpec)===null||K===void 0?void 0:K.data)===null||U===void 0?void 0:U.fields)===null||Q===void 0?void 0:Q[xt])===null||dt===void 0?void 0:dt.domain:void 0}});else{const k=typeof H.chartSpec.xField=="string"?H.chartSpec.xField:H.chartSpec.xField[0];M[k]={by:t,type:H.chartSpec.direction!=="horizontal"?"xField":void 0,range:H.chartSpec.direction==="horizontal",sortBy:H.chartSpec.direction!=="horizontal"?(h=(a=(l=(s=H.chartSpec)===null||s===void 0?void 0:s.data)===null||l===void 0?void 0:l.fields)===null||a===void 0?void 0:a[k])===null||h===void 0?void 0:h.domain:void 0};const P=H.chartSpec.yField;M[P]={by:e,range:i.indicators[T].chartSpec.direction!=="horizontal",sumBy:H.chartSpec.stack!==!1&&t.concat((d=H.chartSpec)===null||d===void 0?void 0:d.xField),sortBy:H.chartSpec.direction==="horizontal"?(f=(g=(c=(u=H.chartSpec)===null||u===void 0?void 0:u.data)===null||c===void 0?void 0:c.fields)===null||g===void 0?void 0:g[P])===null||f===void 0?void 0:f.domain:void 0}}}else{const H=i.indicators[T];if(M[H.indicatorKey]={by:t,range:!0,sumBy:((p=H.chartSpec)===null||p===void 0?void 0:p.stack)!==!1&&e.concat((m=H.chartSpec)===null||m===void 0?void 0:m.yField)},H.chartSpec.series)H.chartSpec.series.forEach(k=>{var P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt;const pt=typeof k.yField=="string"?k.yField:k.yField[0];M[pt]={by:e,type:k.direction==="horizontal"?"yField":void 0,range:k.direction!=="horizontal",sortBy:k.direction==="horizontal"?(I=(F=(E=(P=k==null?void 0:k.data)===null||P===void 0?void 0:P.fields)===null||E===void 0?void 0:E[pt])===null||F===void 0?void 0:F.domain)!==null&&I!==void 0?I:(V=(O=(D=(L=H.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[pt])===null||V===void 0?void 0:V.domain:void 0};const xt=k.xField;M[xt]={by:t,range:k.direction==="horizontal",sumBy:k.stack!==!1&&e.concat(k==null?void 0:k.yField),sortBy:k.direction!=="horizontal"?(X=($=(j=(W=k==null?void 0:k.data)===null||W===void 0?void 0:W.fields)===null||j===void 0?void 0:j[xt])===null||$===void 0?void 0:$.domain)!==null&&X!==void 0?X:(dt=(Q=(U=(K=H.chartSpec)===null||K===void 0?void 0:K.data)===null||U===void 0?void 0:U.fields)===null||Q===void 0?void 0:Q[xt])===null||dt===void 0?void 0:dt.domain:void 0}});else{const k=typeof H.chartSpec.yField=="string"?H.chartSpec.yField:H.chartSpec.yField[0];M[k]={by:e,type:H.chartSpec.direction==="horizontal"?"yField":void 0,range:H.chartSpec.direction!=="horizontal",sortBy:H.chartSpec.direction==="horizontal"?(_=(S=(C=(v=H.chartSpec)===null||v===void 0?void 0:v.data)===null||C===void 0?void 0:C.fields)===null||S===void 0?void 0:S[k])===null||_===void 0?void 0:_.domain:void 0};const P=H.chartSpec.xField;M[P]={by:t,range:i.indicators[T].chartSpec.direction==="horizontal",sumBy:H.chartSpec.stack!==!1&&e.concat((y=H.chartSpec)===null||y===void 0?void 0:y.yField),sortBy:H.chartSpec.direction!=="horizontal"?(x=(R=(A=(w=H.chartSpec)===null||w===void 0?void 0:w.data)===null||A===void 0?void 0:A.fields)===null||R===void 0?void 0:R[P])===null||x===void 0?void 0:x.domain:void 0}}}return M}function P9(i){var t;const e=[];return(t=i.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:It.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=i.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:It.RECORD})}else{const s=i.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:It.RECORD})}}),e}function H9(i,t,e){var n,o;const r=M9(i);let s=r.columnDimensionTree,l=r.rowDimensionTree,a=!1,h=!1;i.columnTree&&i.indicatorsAsCol&&!s.dimensionKeys.contain(ji)&&(a=!0),i.rowTree&&(i.indicatorsAsCol||l.dimensionKeys.contain(ji)||(h=!0));const{dataset:d,layoutNodeId:u}=r,c={options:i,layoutNodeId:u,internalProps:i,isPivotChart:()=>!0,pivotChartAxes:[],_selectedDataItemsInChart:[],_getActiveChartInstance:()=>({updateState:()=>{}})};i.columnTree&&!a||(s=new Me((n=d.colHeaderTree)!==null&&n!==void 0?n:[],u)),i.rowTree&&!h||(l=new Me((o=d.rowHeaderTree)!==null&&o!==void 0?o:[],u));const g=new Jo(c,d,s,l);for(let f=0;f<g.colCount;f++)for(let p=0;p<g.rowCount;p++){if(g.isHeader(f,p))continue;const m=g.getCellHeaderPaths(f,p),v=m.colHeaderPaths.map(y=>{var w;return(w=y.indicatorKey)!==null&&w!==void 0?w:y.value}),C=m.rowHeaderPaths.map(y=>{var w;return(w=y.indicatorKey)!==null&&w!==void 0?w:y.value}),S=d.getAggregator(g.indicatorsAsCol?C:C.slice(0,-1),g.indicatorsAsCol?v.slice(0,-1):v,g.getIndicatorKey(f,p)),_=E9(S.value?S.value():void 0,t,f,p,g,e);if(_)return _}}function E9(i,t,e,n,o,r){if(it(i)){for(let s=0;s<i.length;s++)if(r?r(i[s],t):k9(i[s],t))return o.getCellHeaderPaths(e,n)}}function k9(i,t){return JSON.stringify(i)===JSON.stringify(t)}function L9(i){return new Pa(i?i.attribute:{})}function F9(i){return new mr(i?i.attribute:{})}function I9(i){return new Na(i?i.attribute:{})}class D9{constructor(t,e){var n,o,r,s,l,a;this.willUpdateRow=!1,this.willUpdateCol=!1,this.table=t,this.rowCount=(n=e==null?void 0:e.rowCount)!==null&&n!==void 0?n:void 0,this.colCount=(o=e==null?void 0:e.colCount)!==null&&o!==void 0?o:void 0,this.animationDuration=(r=e==null?void 0:e.animationDuration)!==null&&r!==void 0?r:500,this.animationDelay=(s=e==null?void 0:e.animationDelay)!==null&&s!==void 0?s:1e3,this.animationEasing=(l=e==null?void 0:e.animationEasing)!==null&&l!==void 0?l:"linear",this.replaceScrollAction=(a=e==null?void 0:e.replaceScrollAction)!==null&&a!==void 0&&a,this.reset(),this.init()}init(){this.replaceScrollAction&&(this.table.disableScroll(),this.table.scenegraph.stage.addEventListener("wheel",this.onScrollEnd.bind(this)))}reset(){this.playing=!1,this.row=this.table.frozenRowCount,this.col=this.table.frozenColCount}onScrollEnd(t){this.rowCount?(t.deltaY>0?(this.row+=this.rowCount,this.row=Math.min(this.row,this.table.rowCount-this.table.frozenRowCount)):t.deltaY<0&&(this.row-=this.rowCount,this.row=Math.max(this.row,this.table.frozenRowCount)),this.table.scrollToRow(this.row,{duration:this.animationDuration,easing:this.animationEasing})):this.colCount&&(t.deltaX>0?(this.col+=this.colCount,this.col=Math.min(this.col,this.table.colCount-this.table.frozenColCount)):t.deltaX<0&&(this.col-=this.colCount,this.col=Math.max(this.col,this.table.frozenColCount)),this.table.scrollToCol(this.col,{duration:this.animationDuration,easing:this.animationEasing}))}play(){this.playing=!0,this.rowCount&&!this.willUpdateRow?this.updateRow():this.colCount&&!this.willUpdateCol&&this.updateCol()}pause(){this.playing=!1}updateRow(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenTopRow!==this.row?(this.row=this.table.frozenRowCount,t=!1):this.row+=this.rowCount,this.table.scrollToRow(this.row,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateRow=!0,setTimeout(()=>{this.willUpdateRow=!1,this.updateRow()},this.animationDuration+this.animationDelay)}updateCol(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenLeftCol!==this.col?(this.col=this.table.frozenColCount,t=!1):this.col+=this.colCount,this.table.scrollToCol(this.col,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateCol=!0,setTimeout(()=>{this.willUpdateCol=!1,this.updateCol()},this.animationDuration+this.animationDelay)}}class O9{constructor(t,e){this.table=t,this.options=e,this.registerStyle(),this.bindEvent()}registerStyle(){var t,e,n,o,r,s,l,a;this.table.registerCustomCellStyle("col-highlight",{bgColor:(e=(t=this.options)===null||t===void 0?void 0:t.colHighlightBGColor)!==null&&e!==void 0?e:"#82b2f5",color:(o=(n=this.options)===null||n===void 0?void 0:n.colHighlightColor)!==null&&o!==void 0?o:"#FFF"}),this.table.registerCustomCellStyle("row-highlight",{bgColor:(s=(r=this.options)===null||r===void 0?void 0:r.rowHighlightBGColor)!==null&&s!==void 0?s:"#82b2f5",color:(a=(l=this.options)===null||l===void 0?void 0:l.rowHighlightColor)!==null&&a!==void 0?a:"#FFF"})}bindEvent(){this.table.on("selected_cell",t=>{this.updateHighlight()}),this.table.on("selected_clear",()=>{this.clearHighlight()}),this.table.on("mousemove_table",()=>{this.table.stateManager.select.selecting&&this.updateHighlight()})}clearHighlight(){this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),this.colHeaderRange=void 0,this.rowHeaderRange=void 0}updateHighlight(){var t,e,n,o;if(((t=this.options)===null||t===void 0?void 0:t.colHighlight)===!1&&((e=this.options)===null||e===void 0?void 0:e.rowHighlight)===!1)return;const r=this.table.getSelectedCellRanges();if(r.length===0)return void this.clearHighlight();const s=r[0],l=[s.start.row,s.end.row];l.sort((u,c)=>u-c);const a=[s.start.col,s.end.col];let h,d;a.sort((u,c)=>u-c),this.table.isPivotTable()?(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}):this.table.internalProps.transpose?d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}:(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},this.table.internalProps.rowSeriesNumber&&(d={start:{col:0,row:l[0]},end:{col:0,row:l[1]}})),((n=this.options)===null||n===void 0?void 0:n.colHighlight)===!1||dT(this.colHeaderRange,h)||(this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),h&&this.table.arrangeCustomCellStyle({range:h},"col-highlight"),this.colHeaderRange=h),((o=this.options)===null||o===void 0?void 0:o.rowHighlight)===!1||dT(this.rowHeaderRange,d)||(this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),d&&this.table.arrangeCustomCellStyle({range:d},"row-highlight"),this.rowHeaderRange=d)}}function dT(i,t){return i===void 0&&t===void 0||i!==void 0&&t!==void 0&&i.start.col===t.start.col&&i.start.row===t.start.row&&i.end.col===t.end.col&&i.end.row===t.end.row}FS();const z9="1.11.1";function W9(){return fn()}function N9(){OA()}const V9=Object.freeze(Object.defineProperty({__proto__:null,CarouselAnimationPlugin:D9,CustomLayout:T9,DataStatistics:E8,EventTarget:Va,HeaderHighlightPlugin:O9,InvertHighlightPlugin:M4,ListTable:d9,ListTableSimple:u9,PIVOT_CHART_EVENT_TYPE:iA,PIVOT_TABLE_EVENT_TYPE:qo,PivotChart:m9,PivotTable:aT,PivotTableSimple:p9,TABLE_EVENT_TYPE:nt,TYPES:bz,VArc:sI,VArea:lI,VCheckBox:F9,VCircle:aI,VGlyph:dI,VGroup:hI,VImage:uI,VLine:cI,VPath:gI,VPolygon:fI,VRadio:I9,VRect:pI,VSymbol:mI,VTag:L9,VText:vI,clearGlobal:N9,core:w8,data:MW,getDataCellPath:H9,getIcons:W9,getTargetCell:wr,graphicUtil:a1,jsx:CI,onBeforeAttributeUpdateForInvertHighlight:Kx,register:T8,registerAxis:vg,registerChartCell:Sg,registerCheckboxCell:xg,registerEmptyTip:bg,registerImageCell:Rg,registerLegend:Cg,registerMenu:yg,registerProgressBarCell:Ag,registerRadioCell:Tg,registerSparkLineCell:Mg,registerTextCell:Al,registerTitle:_g,registerTooltip:wg,registerVideoCell:Bg,renderChart:Pm,restoreMeasureText:O4,setCustomAlphabetCharSet:D4,themes:bW,updateCell:po,version:z9},Symbol.toStringTag,{value:"Module"})),vs=sB.create({baseURL:"/",validateStatus(i){return i===200},timeout:1e3*15});vs.interceptors.request.use(i=>i,i=>Promise.reject(i)),vs.interceptors.response.use(i=>{var t,e;return+((t=i==null?void 0:i.data)==null?void 0:t.code)==500&&Ii.message.error({content:((e=i==null?void 0:i.data)==null?void 0:e.msg)||"服务器异常",key:"SERVER_ERROR"}),i},i=>{if(i.message.includes("timeout"))Ii.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:t}=i.response;t===401?Ii.message.error({content:"当前用户信息不正确",key:"REQUEST_ERROR"}):t>=500?Ii.message.error({content:"服务器异常",key:"REQUEST_ERROR"}):Ii.message.error({content:"请求异常",key:"REQUEST_ERROR"})}return Promise.reject(i)});var uT={},j9={get exports(){return uT},set exports(i){uT=i}};(function(i,t){(function(e,n){i.exports=n(Ol)})(FP,function(e){function n(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=n(e),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var a=100*s+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return o.default.locale(r,null,!0),r})})(j9);const bY="",Ti=(i,t)=>{const e=i.__vccOpts||i;for(const[n,o]of t)e[n]=o;return e};Ol.locale("zh-cn");const $9=b.defineComponent({name:"PivotFilter",props:{data:{type:Object,default:()=>{}},theme:{type:String,default:"light"},graphicConfig:{type:Object,default:()=>({})},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""},customDimensions:{type:Array,default:()=>[]},dimensions:{type:Array,default:()=>[]},indicators:{type:Array,default:()=>[]}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(!1),r=b.ref(!1),s=b.ref([]),l=b.ref(""),a=b.ref(),h=b.ref(""),d=b.ref([]),u=b.ref(),c=b.ref("date"),g=b.ref("date"),f=[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}],p=[{label:"单个日期",value:"date"},{label:"日期范围",value:"range"}],m=T=>{r.value=!1,s.value=T.target.checked?b.unref(d).map(B=>B.value):[]};b.watch(s,T=>{o.value=T.length===b.unref(d).length,r.value=!!T.length&&T.length<b.unref(d).length});const v=async T=>{const{queryColumnList:B=[],edvDataSetId:H="",source:k,dataSourceId:P}=i.graphicConfig;let E=B.find(D=>D.name===T||D.label===T);E||(E=i.customDimensions.find(D=>D.name===T||D.label===T));const F=await vs.post(`${i.indicatorUrl}/diagram/groupvalue`,{source:k,groupColumn:T,hrpIndexTypeGuid:E==null?void 0:E.typeGuid,pageId:i.pageId,pageFlag:!0,edvDataSetId:H,dataSourceId:P},{headers:{Authentication:i.indicatorToken,operateContext:i.context}}),{success:I,data:L=[]}=F.data;I&&(d.value=L.map(D=>({value:D})))},C=b.ref("");async function S(){const{filterData:T,type:B,key:H}=i.data,P=i.dimensions.concat(i.indicators).find(E=>E.label===H);P&&(C.value=P.genericType),b.unref(C)==="DATE"?u.value="date":u.value="select",B==="dimension"?b.unref(u)==="select"?(await v(H),Array.isArray(T)?s.value=T:s.value=(T==null?void 0:T.value)||[]):b.unref(u)==="date"&&(Array.isArray(T)?(c.value="range",(T==null?void 0:T.length)===2&&(a.value=[Ol(T[0].value),Ol(T[1].value)])):(c.value="date",a.value=T!=null&&T.value?Ol(T.value):null)):(l.value=(T==null?void 0:T.rule)||"",a.value=(T==null?void 0:T.value)||""),n.value=!0}const _=b.computed(()=>"YYYY-MM-DD");function y(){var k;const{key:T,type:B}=i.data;let H={};B==="dimension"?b.unref(u)==="select"?H={rule:"IN",value:b.unref(s)}:b.unref(u)==="date"&&(b.unref(c)==="date"?H={rule:"EQUAL",value:((k=b.unref(a))==null?void 0:k.format(b.unref(_)))||""}:b.unref(c)==="range"&&b.unref(a)&&(H=[{rule:"GREATER_EQUAL",value:b.unref(a)[0].format(b.unref(_))},{rule:"LESS_EQUAL",value:b.unref(a)[1].format(b.unref(_))}])):H={rule:b.unref(l),value:b.unref(a)},t("change",{checkKeys:H,key:T,type:B}),n.value=!1}function w(){l.value="",a.value=null}const A=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":""),R=()=>document.getElementsByClassName("filter-modal")[0]||document.body,x=b.computed(()=>{let T="270px";return b.unref(u)==="date"&&(T=""),{padding:"10px",height:T,maxHeight:"280px"}}),M=()=>{a.value=null};return b.watch(n,T=>{window.modalShow&&window.modalShow(T)}),e({showModal:S}),{visible:n,checkAllDimensions:o,dimIndeterminate:r,dimensionCheckKeys:s,ruleValue:l,ruleOptions:f,filterValue:a,searchDimName:h,fontColor:A,valueList:d,filterType:u,dateSelectType:c,bodyStyle:x,dateType:g,dateSelectOptions:p,formatStr:_,handleOk:y,onCheckAllDimChange:m,handleClear:w,getPopupContainer:R,onChangeSelectType:M}}}),G9={class:"wrap-header"},U9={class:"wrap-body"},K9={style:{padding:"20px"}},Y9={style:{padding:"10px 20px"}},X9={key:0,class:"ecan-date-picker"},q9={key:1,class:"ecan-range-picker"},Z9={key:1},J9={style:{padding:"20px"}},Q9={style:{padding:"10px 20px"}};function t7(i,t,e,n,o,r){var p;const s=b.resolveComponent("a-checkbox"),l=b.resolveComponent("a-input"),a=b.resolveComponent("a-checkbox-group"),h=b.resolveComponent("a-select-option"),d=b.resolveComponent("a-select"),u=b.resolveComponent("a-date-picker"),c=b.resolveComponent("a-range-picker"),g=b.resolveComponent("a-button"),f=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(f,{wrapClassName:i.theme+" filter-modal",visible:i.visible,"onUpdate:visible":t[9]||(t[9]=m=>i.visible=m),title:((p=i.data)==null?void 0:p.fieldName)+"-筛选","ok-text":"确认","cancel-text":"取消",bodyStyle:i.bodyStyle,onOk:i.handleOk},{footer:b.withCtx(()=>[b.createVNode(g,{onClick:t[8]||(t[8]=m=>i.visible=!1)},{default:b.withCtx(()=>t[10]||(t[10]=[b.createTextVNode("取消")])),_:1}),i.data.type==="indicators"?(b.openBlock(),b.createBlock(g,{key:0,onClick:i.handleClear},{default:b.withCtx(()=>t[11]||(t[11]=[b.createTextVNode("清除筛选")])),_:1},8,["onClick"])):b.createCommentVNode("",!0),b.createVNode(g,{type:"primary",onClick:i.handleOk},{default:b.withCtx(()=>t[12]||(t[12]=[b.createTextVNode("确定")])),_:1},8,["onClick"])]),default:b.withCtx(()=>[i.data.type==="dimension"?(b.openBlock(),b.createElementBlock("div",{key:0,class:b.normalizeClass(["dimension-wrap",i.filterType==="select"?"border":""])},[i.filterType==="select"?(b.openBlock(),b.createElementBlock(b.Fragment,{key:0},[b.createElementVNode("div",G9,[b.createVNode(s,{checked:i.checkAllDimensions,"onUpdate:checked":t[0]||(t[0]=m=>i.checkAllDimensions=m),indeterminate:i.dimIndeterminate,disabled:!!i.searchDimName,onChange:i.onCheckAllDimChange},{default:b.withCtx(()=>[b.createElementVNode("span",{style:b.normalizeStyle({color:i.fontColor})},"全选",4)]),_:1},8,["checked","indeterminate","disabled","onChange"]),b.createVNode(l,{value:i.searchDimName,"onUpdate:value":t[1]||(t[1]=m=>i.searchDimName=m),placeholder:"请输入关键字搜索",style:{width:"200px","margin-left":"15px"}},null,8,["value"])]),b.createElementVNode("div",U9,[b.createVNode(a,{value:i.dimensionCheckKeys,"onUpdate:value":t[2]||(t[2]=m=>i.dimensionCheckKeys=m),style:{width:"100%"}},{default:b.withCtx(()=>[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.valueList||[],(m,v)=>b.withDirectives((b.openBlock(),b.createElementBlock("div",{class:"body-item",key:v},[b.createVNode(s,{value:m.value},{default:b.withCtx(()=>[b.createElementVNode("span",{style:b.normalizeStyle({color:i.fontColor})},b.toDisplayString(m.value),5)]),_:2},1032,["value"])])),[[b.vShow,!i.searchDimName||m.value.includes(i.searchDimName)]])),128))]),_:1},8,["value"])])],64)):i.filterType==="date"?(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[b.createElementVNode("div",K9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选类型:",4),b.createVNode(d,{value:i.dateSelectType,"onUpdate:value":t[3]||(t[3]=m=>i.dateSelectType=m),style:{width:"200px"},placeholder:"请选择",getPopupContainer:i.getPopupContainer,onChange:i.onChangeSelectType},{default:b.withCtx(()=>[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dateSelectOptions,m=>(b.openBlock(),b.createBlock(h,{key:m.value,value:m.value},{default:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer","onChange"])]),b.createElementVNode("div",Y9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选值:",4),i.dateSelectType==="date"?(b.openBlock(),b.createElementBlock("span",X9,[b.createVNode(u,{dropdownClassName:"ecan-date-picker-dropdown",value:i.filterValue,"onUpdate:value":t[4]||(t[4]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,getPopupContainer:i.getPopupContainer},null,8,["value","picker","format","getPopupContainer"])])):i.dateSelectType==="range"?(b.openBlock(),b.createElementBlock("span",q9,[b.createVNode(c,{dropdownClassName:"ecan-range-picker-dropdown",value:i.filterValue,"onUpdate:value":t[5]||(t[5]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,getPopupContainer:i.getPopupContainer},null,8,["value","picker","format","getPopupContainer"])])):b.createCommentVNode("",!0)])],64)):b.createCommentVNode("",!0)],2)):i.data.type==="indicators"?(b.openBlock(),b.createElementBlock("div",Z9,[b.createElementVNode("div",J9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选规则:",4),b.createVNode(d,{value:i.ruleValue,"onUpdate:value":t[6]||(t[6]=m=>i.ruleValue=m),style:{width:"200px"},placeholder:"请选择",getPopupContainer:i.getPopupContainer},{default:b.withCtx(()=>[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.ruleOptions,m=>(b.openBlock(),b.createBlock(h,{key:m.value,value:m.value},{default:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer"])]),b.createElementVNode("div",Q9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选值:",4),b.createVNode(l,{value:i.filterValue,"onUpdate:value":t[7]||(t[7]=m=>i.filterValue=m),placeholder:"请输入",style:{width:"200px"}},null,8,["value"])])])):b.createCommentVNode("",!0)]),_:1},8,["wrapClassName","visible","title","bodyStyle","onOk"])}const cT=Ti($9,[["render",t7],["__scopeId","data-v-8942ea1c"]]),e7=b.defineComponent({name:"PivotProperty",props:{theme:{type:String,default:"light"}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref({unit:"",format:"",floatLength:""}),r=[{label:"整数",value:"integer"},{label:"小数",value:"float"},{label:"百分比",value:"percent"}];function s(h){o.value=h,n.value=!0}function l(){t("change",b.unref(o)),n.value=!1}const a=()=>document.getElementsByClassName("property-modal")[0]||document.body;return b.watch(n,h=>{window.modalShow&&window.modalShow(h)}),e({showModal:s}),{visible:n,formData:o,handleOk:l,getPopupContainer:a,formatOptions:r}}});function i7(i,t,e,n,o,r){const s=b.resolveComponent("a-input"),l=b.resolveComponent("a-form-item"),a=b.resolveComponent("a-radio-button"),h=b.resolveComponent("a-radio-group"),d=b.resolveComponent("a-select"),u=b.resolveComponent("a-form"),c=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(c,{wrapClassName:i.theme+" property-modal",visible:i.visible,"onUpdate:visible":t[4]||(t[4]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",title:i.formData.fieldName+"-度量属性",destroyOnClose:!1,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(u,null,{default:b.withCtx(()=>[b.createVNode(l,{label:"度量单位"},{default:b.withCtx(()=>[b.createVNode(s,{value:i.formData.unit,"onUpdate:value":t[0]||(t[0]=g=>i.formData.unit=g)},null,8,["value"])]),_:1}),i.formData.unit?(b.openBlock(),b.createBlock(l,{key:0,label:"度量单位位置"},{default:b.withCtx(()=>[b.createVNode(h,{value:i.formData.position,"onUpdate:value":t[1]||(t[1]=g=>i.formData.position=g),"button-style":"solid"},{default:b.withCtx(()=>[b.createVNode(a,{value:"left"},{default:b.withCtx(()=>t[5]||(t[5]=[b.createTextVNode("数据左侧")])),_:1}),b.createVNode(a,{value:"right"},{default:b.withCtx(()=>t[6]||(t[6]=[b.createTextVNode("数据右侧")])),_:1})]),_:1},8,["value"])]),_:1})):b.createCommentVNode("",!0),b.createVNode(l,{label:"格式化"},{default:b.withCtx(()=>[b.createVNode(d,{value:i.formData.format,"onUpdate:value":t[2]||(t[2]=g=>i.formData.format=g),options:i.formatOptions,getPopupContainer:i.getPopupContainer},null,8,["value","options","getPopupContainer"])]),_:1}),i.formData.format==="float"?(b.openBlock(),b.createBlock(l,{key:1,label:"小数位数"},{default:b.withCtx(()=>[b.createVNode(s,{type:"number",value:i.formData.floatLength,"onUpdate:value":t[3]||(t[3]=g=>i.formData.floatLength=g),min:0},null,8,["value"])]),_:1})):b.createCommentVNode("",!0)]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])}const n7=Ti(e7,[["render",i7]]);function In(i,t){o7(i)&&(i="100%");var e=r7(i);return i=t===360?i:Math.min(t,Math.max(0,parseFloat(i))),e&&(i=parseInt(String(i*t),10)/100),Math.abs(i-t)<1e-6?1:(t===360?i=(i<0?i%t+t:i%t)/parseFloat(String(t)):i=i%t/parseFloat(String(t)),i)}function o7(i){return typeof i=="string"&&i.indexOf(".")!==-1&&parseFloat(i)===1}function r7(i){return typeof i=="string"&&i.indexOf("%")!==-1}function s7(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Pg(i){return i<=1?"".concat(Number(i)*100,"%"):i}function ov(i){return i.length===1?"0"+i:String(i)}function l7(i,t,e){return{r:In(i,255)*255,g:In(t,255)*255,b:In(e,255)*255}}function rv(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?i+(t-i)*(6*e):e<1/2?t:e<2/3?i+(t-i)*(2/3-e)*6:i}function a7(i,t,e){var n,o,r;if(i=In(i,360),t=In(t,100),e=In(e,100),t===0)o=e,r=e,n=e;else{var s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;n=rv(l,s,i+1/3),o=rv(l,s,i),r=rv(l,s,i-1/3)}return{r:n*255,g:o*255,b:r*255}}function h7(i,t,e){i=In(i,255),t=In(t,255),e=In(e,255);var n=Math.max(i,t,e),o=Math.min(i,t,e),r=0,s=n,l=n-o,a=n===0?0:l/n;if(n===o)r=0;else{switch(n){case i:r=(t-e)/l+(t<e?6:0);break;case t:r=(e-i)/l+2;break;case e:r=(i-t)/l+4;break}r/=6}return{h:r,s:a,v:s}}function d7(i,t,e){i=In(i,360)*6,t=In(t,100),e=In(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:h*255,g:d*255,b:u*255}}function u7(i,t,e,n){var o=[ov(Math.round(i).toString(16)),ov(Math.round(t).toString(16)),ov(Math.round(e).toString(16))];return n&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function gT(i){return bn(i)/255}function bn(i){return parseInt(i,16)}var fT={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Rh(i){var t={r:0,g:0,b:0},e=1,n=null,o=null,r=null,s=!1,l=!1;return typeof i=="string"&&(i=f7(i)),typeof i=="object"&&(Qo(i.r)&&Qo(i.g)&&Qo(i.b)?(t=l7(i.r,i.g,i.b),s=!0,l=String(i.r).substr(-1)==="%"?"prgb":"rgb"):Qo(i.h)&&Qo(i.s)&&Qo(i.v)?(n=Pg(i.s),o=Pg(i.v),t=d7(i.h,n,o),s=!0,l="hsv"):Qo(i.h)&&Qo(i.s)&&Qo(i.l)&&(n=Pg(i.s),r=Pg(i.l),t=a7(i.h,n,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(i,"a")&&(e=i.a)),e=s7(e),{ok:s,format:i.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}var c7="[-\\+]?\\d+%?",g7="[-\\+]?\\d*\\.\\d+%?",Pr="(?:".concat(g7,")|(?:").concat(c7,")"),sv="[\\s|\\(]+(".concat(Pr,")[,|\\s]+(").concat(Pr,")[,|\\s]+(").concat(Pr,")\\s*\\)?"),lv="[\\s|\\(]+(".concat(Pr,")[,|\\s]+(").concat(Pr,")[,|\\s]+(").concat(Pr,")[,|\\s]+(").concat(Pr,")\\s*\\)?"),oo={CSS_UNIT:new RegExp(Pr),rgb:new RegExp("rgb"+sv),rgba:new RegExp("rgba"+lv),hsl:new RegExp("hsl"+sv),hsla:new RegExp("hsla"+lv),hsv:new RegExp("hsv"+sv),hsva:new RegExp("hsva"+lv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function f7(i){if(i=i.trim().toLowerCase(),i.length===0)return!1;var t=!1;if(fT[i])i=fT[i],t=!0;else if(i==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=oo.rgb.exec(i);return e?{r:e[1],g:e[2],b:e[3]}:(e=oo.rgba.exec(i),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=oo.hsl.exec(i),e?{h:e[1],s:e[2],l:e[3]}:(e=oo.hsla.exec(i),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=oo.hsv.exec(i),e?{h:e[1],s:e[2],v:e[3]}:(e=oo.hsva.exec(i),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=oo.hex8.exec(i),e?{r:bn(e[1]),g:bn(e[2]),b:bn(e[3]),a:gT(e[4]),format:t?"name":"hex8"}:(e=oo.hex6.exec(i),e?{r:bn(e[1]),g:bn(e[2]),b:bn(e[3]),format:t?"name":"hex"}:(e=oo.hex4.exec(i),e?{r:bn(e[1]+e[1]),g:bn(e[2]+e[2]),b:bn(e[3]+e[3]),a:gT(e[4]+e[4]),format:t?"name":"hex8"}:(e=oo.hex3.exec(i),e?{r:bn(e[1]+e[1]),g:bn(e[2]+e[2]),b:bn(e[3]+e[3]),format:t?"name":"hex"}:!1)))))))))}function Qo(i){return!!oo.CSS_UNIT.exec(String(i))}var Hg=2,pT=.16,p7=.05,m7=.05,v7=.15,mT=5,vT=4,b7=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function bT(i){var t=i.r,e=i.g,n=i.b,o=h7(t,e,n);return{h:o.h*360,s:o.s,v:o.v}}function Eg(i){var t=i.r,e=i.g,n=i.b;return"#".concat(u7(t,e,n,!1))}function C7(i,t,e){var n=e/100,o={r:(t.r-i.r)*n+i.r,g:(t.g-i.g)*n+i.g,b:(t.b-i.b)*n+i.b};return o}function CT(i,t,e){var n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=e?Math.round(i.h)-Hg*t:Math.round(i.h)+Hg*t:n=e?Math.round(i.h)+Hg*t:Math.round(i.h)-Hg*t,n<0?n+=360:n>=360&&(n-=360),n}function yT(i,t,e){if(i.h===0&&i.s===0)return i.s;var n;return e?n=i.s-pT*t:t===vT?n=i.s+pT:n=i.s+p7*t,n>1&&(n=1),e&&t===mT&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function _T(i,t,e){var n;return e?n=i.v+m7*t:n=i.v-v7*t,n>1&&(n=1),Number(n.toFixed(2))}function av(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=[],n=Rh(i),o=mT;o>0;o-=1){var r=bT(n),s=Eg(Rh({h:CT(r,o,!0),s:yT(r,o,!0),v:_T(r,o,!0)}));e.push(s)}e.push(Eg(n));for(var l=1;l<=vT;l+=1){var a=bT(n),h=Eg(Rh({h:CT(a,l),s:yT(a,l),v:_T(a,l)}));e.push(h)}return t.theme==="dark"?b7.map(function(d){var u=d.index,c=d.opacity,g=Eg(C7(Rh(t.backgroundColor||"#141414"),Rh(e[u]),c*100));return g}):e}var hv={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},dv={},uv={};Object.keys(hv).forEach(function(i){dv[i]=av(hv[i]),dv[i].primary=dv[i][5],uv[i]=av(hv[i],{theme:"dark",backgroundColor:"#141414"}),uv[i].primary=uv[i][5]});var wT=[],Ah=[],y7="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function _7(){var i=document.createElement("style");return i.setAttribute("type","text/css"),i}function w7(i,t){if(t=t||{},i===void 0)throw new Error(y7);var e=t.prepend===!0?"prepend":"append",n=t.container!==void 0?t.container:document.querySelector("head"),o=wT.indexOf(n);o===-1&&(o=wT.push(n)-1,Ah[o]={});var r;return Ah[o]!==void 0&&Ah[o][e]!==void 0?r=Ah[o][e]:(r=Ah[o][e]=_7(),e==="prepend"?n.insertBefore(r,n.childNodes[0]):n.appendChild(r)),i.charCodeAt(0)===65279&&(i=i.substr(1,i.length)),r.styleSheet?r.styleSheet.cssText+=i:r.textContent+=i,r}function ST(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){S7(i,o,e[o])})}return i}function S7(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function x7(i,t){process.env.NODE_ENV!=="production"&&!i&&console!==void 0&&console.error("Warning: ".concat(t))}function R7(i,t){x7(i,"[@ant-design/icons-vue] ".concat(t))}function xT(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function cv(i,t,e){return e?b.h(i.tag,ST({key:t},e,i.attrs),(i.children||[]).map(function(n,o){return cv(n,"".concat(t,"-").concat(i.tag,"-").concat(o))})):b.h(i.tag,ST({key:t},i.attrs),(i.children||[]).map(function(n,o){return cv(n,"".concat(t,"-").concat(i.tag,"-").concat(o))}))}function RT(i){return av(i)[0]}function AT(i){return i?Array.isArray(i)?i:[i]:[]}var A7=`
|
|
309
|
+
${h}`:h,referencePosition:{placement:Zi.bottom,rect:d},disappearDelay:(r=l.internalProps.tooltip.overflowTextTooltipDisappearDelay)!==null&&r!==void 0?r:0,style:l.theme.tooltipStyle})}s?this._bindToCell(t,e,s):this._unbindFromCell()}_getTooltipInstanceInfo(t,e){const n=this._table,o=this._tooltipInstances;return o&&o["bubble-tooltip"]||o&&(o["bubble-tooltip"]=jV["bubble-tooltip"](n))}isBinded(t){var e;return JSON.stringify(t)===JSON.stringify((e=this._attachInfo)===null||e===void 0?void 0:e.tooltipOptions)}}const vg=()=>{Bt.registerComponent("axis",pV),Bt.registerFunction("computeAxisComponentWidth",bV),Bt.registerFunction("computeAxisComponentHeight",CV),Bt.registerFunction("getAxisConfigInPivotChart",u8)},bg=()=>{Bt.registerComponent("emptyTip",_V)},Cg=()=>{Bt.registerFunction("createLegend",HV)},yg=()=>{Bt.registerComponent("menuHandler",DV)},_g=()=>{Bt.registerComponent("title",OV)},wg=()=>{Bt.registerComponent("tooltipHandler",$V)};class GV{constructor(t){this.titleRows=[],this.showedTitleRows=[],this.rowNow=-1,this.skipStartRow=-1,this.skipEndRow=-1,this.table=t,this.table.on("scroll",e=>{e.scrollDirection==="vertical"&&this.updateGroupTitle()}),this.table.on("resize_column",e=>{this.updateGroupTitle()})}updateGroupTitle(){this.table.scrollTop===0?(this.titleRows=[],this.showedTitleRows=[]):this.skipStartRow!==-1&&this.skipEndRow!==-1&&this.skipStartRow!==this.table.scenegraph.proxy.bodyTopRow-1?(this.table.scenegraph.proxy.screenTopRow<=this.skipStartRow||this.table.scenegraph.proxy.screenTopRow>=this.skipEndRow)&&(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()):(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()),this.updateScenegraph()}updateGroupTitleInfo(){this.rowNow=this.table.scenegraph.proxy.screenTopRow+this.titleRows.length;const t=this.table.getRecordIndexByCell(0,this.rowNow),e=this.table.getRecordIndexByCell(0,this.rowNow+1);this.getTitleRowsByRecordIndex(t,e)}getTitleRowsByRecordIndex(t,e){it(t)||(t=[t]),it(e)||(e=[e]);for(let l=0;l<t.length;l++){const a=t.slice(0,l+1);this.table.dataSource.getRaw(a)}const n=[],o=e.length===t.length+1;let r=t.slice(0,o?t.length:t.length-1);const s=this.table.dataSource.currentIndexedData;for(let l=this.rowNow-this.table.columnHeaderLevelCount;l>=0;l--){const a=s[l];if(it(a)&&r.length===a.length){let h=!0;for(let d=0;d<a.length;d++)if(a[d]!==r[d]){h=!1;break}h&&(n.push(l+this.table.columnHeaderLevelCount),r=r.slice(0,r.length-1))}else if(a===t[0]){n.push(l+this.table.columnHeaderLevelCount);break}}this.titleRows=n.reverse()}updateScenegraph(){const{table:t}=this,{shadowGroup:e,shadowGroupFrozen:n}=KV(t);this.showedTitleRows.length=0;let o=0;for(let r=0;r<t.colCount;r++){let s;r<t.frozenColCount?(s=new ie({x:t.getColsWidth(0,r-1),y:t.getFrozenRowsHeight()}),n.add(s)):(s=new ie({x:t.getColsWidth(t.frozenColCount,r-1),y:t.getFrozenRowsHeight()}),e.add(s)),s.col=r;for(let l=0;l<this.titleRows.length;l++){const a=this.titleRows[l];if(UV(a,this.rowNow,t.scenegraph.proxy.screenTopRow,this.titleRows)){r===0&&o++;continue}r===0&&this.showedTitleRows.push(a);const h=t.scenegraph.getCell(r,a);if(h.role==="cell"){const d=QA(h);d.setAttributes({y:40*l}),s.add(d)}else{const d=po(r,a,t,!0,!0);d.setAttributes({y:40*l}),s.add(d)}}}o>0&&this.skipStartRow===-1&&this.skipEndRow===-1&&(this.skipStartRow=t.scenegraph.proxy.screenTopRow-1,this.skipEndRow=t.scenegraph.proxy.screenTopRow+1)}}function UV(i,t,e,n){return i===t&&i!==e+n.length-1?!0:i===e+n.indexOf(i)+1&&i<t}function QA(i){const t=i.clone();if(t.role=i.role,t.col=i.col,t.row=i.row,t.mergeStartCol=i.mergeStartCol,t.mergeStartRow=i.mergeStartRow,t.mergeEndCol=i.mergeEndCol,t.mergeEndRow=i.mergeEndRow,t.contentWidth=i.contentWidth,t.contentHeight=i.contentHeight,t.role==="cell"){const e=ke({x:0,y:0,width:t.attribute.width,height:t.attribute.height});t.add(e)}if(i.type==="group"){const e=t;i.forEachChildren(n=>{const o=QA(n);e.add(o)})}return t}function KV(i){const t=i.scenegraph.colHeaderGroup,e=i.scenegraph.cornerHeaderGroup;if(!t.border){const r=ke({x:0,y:0,width:0,height:0,cursor:"pointer"});t.add(r),t.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=wr(a),{col:d,row:u}=h;tT(u-l.indexOf(u),i)})}if(!e.border){const r=ke({x:0,y:0,width:0,height:0,cursor:"pointer"});e.add(r),e.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=wr(a),{col:d,row:u}=h;tT(u-l.indexOf(u),i)})}const n=t.border.shadowRoot,o=e.border.shadowRoot;return n.removeAllChild(),o.removeAllChild(),{shadowGroup:n,shadowGroupFrozen:o}}function tT(i,t){const e=t.getDrawRange();if(z(i)&&i>=t.frozenRowCount){const n=t.getFrozenRowsHeight(),o=t.getRowsHeight(0,i-1);t.scrollTop=Math.min(o-n,t.getAllRowsHeight()-e.height)-1}t.scenegraph.updateNextFrame()}const YV=()=>{Bt.registerComponent("listTreeStickCellPlugin",GV)},XV={};function qV(){return Ga(XV,hg)}function ZV(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C){var S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K;const U=qV()[d],Q=f._getCellStyle(o,r),dt=wc("padding",Q,o,r,f);if(z(dt)&&(a=dt),!i){const pt=ds(o,r,p,f);v&&(i=f.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(_=(S=p==null?void 0:p.group)===null||S===void 0?void 0:S.lineWidth)!==null&&_!==void 0?_:void 0,fill:(w=(y=p==null?void 0:p.group)===null||y===void 0?void 0:y.fill)!==null&&w!==void 0?w:void 0,stroke:(R=(A=p==null?void 0:p.group)===null||A===void 0?void 0:A.stroke)!==null&&R!==void 0?R:void 0,strokeArrayWidth:pt,strokeArrayColor:(M=(x=p==null?void 0:p.group)===null||x===void 0?void 0:x.strokeArrayColor)!==null&&M!==void 0?M:void 0,cursor:(B=(T=p==null?void 0:p.group)===null||T===void 0?void 0:T.cursor)!==null&&B!==void 0?B:void 0,lineDash:(k=(H=p==null?void 0:p.group)===null||H===void 0?void 0:H.lineDash)!==null&&k!==void 0?k:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius}),i&&i.role==="cell"||((i=new ie({x:e,y:n,width:s,height:l,lineWidth:(E=(P=p==null?void 0:p.group)===null||P===void 0?void 0:P.lineWidth)!==null&&E!==void 0?E:void 0,fill:(I=(F=p==null?void 0:p.group)===null||F===void 0?void 0:F.fill)!==null&&I!==void 0?I:void 0,stroke:(D=(L=p==null?void 0:p.group)===null||L===void 0?void 0:L.stroke)!==null&&D!==void 0?D:void 0,strokeArrayWidth:pt,strokeArrayColor:(V=(O=p==null?void 0:p.group)===null||O===void 0?void 0:O.strokeArrayColor)!==null&&V!==void 0?V:void 0,cursor:(j=(W=p==null?void 0:p.group)===null||W===void 0?void 0:W.cursor)!==null&&j!==void 0?j:void 0,lineDash:(X=($=p==null?void 0:p.group)===null||$===void 0?void 0:$.lineDash)!==null&&X!==void 0?X:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}if(i.AABBBounds.width(),C&&Array.isArray(f.getCellValue(o,r))||!C){const pt=new pl(m,{stroke:!1,x:a[3],y:a[0],canvas:(K=f.canvas)!==null&&K!==void 0?K:f.scenegraph.stage.window.getContext().canvas,mode:f.options.mode,modeParams:f.options.modeParams,spec:u,ClassType:U,width:s-a[3]-a[1],height:l-a[2]-a[0],chartInstance:c,dataId:g,data:f.getCellValue(o,r)||[],cellPadding:a,dpr:f.internalProps.pixelRatio,axes:f.isPivotChart()?f.internalProps.layoutMap.getChartAxes(o,r):[],tableChartOption:f.options.chartOption});i.appendChild(pt),f.internalProps.layoutMap.setChartInstance(o,r,pt.chartInstance)}return i}function JV(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v){var C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$;if(!i){const dt=ds(o,r,f,g);v&&(i=g.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:l,height:a,lineWidth:(S=(C=f==null?void 0:f.group)===null||C===void 0?void 0:C.lineWidth)!==null&&S!==void 0?S:void 0,fill:(y=(_=f==null?void 0:f.group)===null||_===void 0?void 0:_.fill)!==null&&y!==void 0?y:void 0,stroke:(A=(w=f==null?void 0:f.group)===null||w===void 0?void 0:w.stroke)!==null&&A!==void 0?A:void 0,strokeArrayWidth:dt,strokeArrayColor:(x=(R=f==null?void 0:f.group)===null||R===void 0?void 0:R.strokeArrayColor)!==null&&x!==void 0?x:void 0,cursor:(T=(M=f==null?void 0:f.group)===null||M===void 0?void 0:M.cursor)!==null&&T!==void 0?T:void 0,lineDash:(H=(B=f==null?void 0:f.group)===null||B===void 0?void 0:B.lineDash)!==null&&H!==void 0?H:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),i&&i.role==="cell"||((i=new ie({x:e,y:n,width:l,height:a,lineWidth:(P=(k=f==null?void 0:f.group)===null||k===void 0?void 0:k.lineWidth)!==null&&P!==void 0?P:void 0,fill:(F=(E=f==null?void 0:f.group)===null||E===void 0?void 0:E.fill)!==null&&F!==void 0?F:void 0,stroke:(L=(I=f==null?void 0:f.group)===null||I===void 0?void 0:I.stroke)!==null&&L!==void 0?L:void 0,strokeArrayWidth:dt,strokeArrayColor:(O=(D=f==null?void 0:f.group)===null||D===void 0?void 0:D.strokeArrayColor)!==null&&O!==void 0?O:void 0,cursor:(W=(V=f==null?void 0:f.group)===null||V===void 0?void 0:V.cursor)!==null&&W!==void 0?W:void 0,lineDash:($=(j=f==null?void 0:f.group)===null||j===void 0?void 0:j.lineDash)!==null&&$!==void 0?$:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}let X;if(c){let dt=o,pt=r;m&&(dt=m.start.col,pt=m.start.row),X=g.getCellIcons(dt,pt)}let K=0,U=0;if(Array.isArray(X)&&X.length!==0){const{leftIconWidth:dt,rightIconWidth:pt,absoluteLeftIconWidth:xt,absoluteRightIconWidth:G}=Ac(X,i,m,g);K=dt+pt,U=dt,i.forEachChildren(q=>{q.role==="icon-left"?q.setAttribute("x",q.attribute.x+h[3]):q.role==="icon-right"?q.setAttribute("x",q.attribute.x+l-pt-h[1]):q.role==="icon-absolute-right"&&q.setAttribute("x",q.attribute.x+l-G-h[1])}),i.forEachChildren(q=>{u==="middle"?q.setAttribute("y",(a-q.AABBBounds.height())/2):u==="bottom"?q.setAttribute("y",a-q.AABBBounds.height()-h[2]):q.setAttribute("y",h[0])})}const Q=QV(o,r,s-K,l,a,h,f,p,g);return Q&&i.appendChild(Q),Q.render(),l-=h[1]+h[3]+K,a-=h[0]+h[2],d==="center"?Q.setAttribute("x",h[3]+U+(l-Q.AABBBounds.width())/2):d==="right"?Q.setAttribute("x",h[3]+U+l-Q.AABBBounds.width()):Q.setAttribute("x",h[3]+U),u==="middle"?Q.setAttribute("y",h[0]+(a-Q.AABBBounds.height())/2):u==="bottom"?Q.setAttribute("y",h[0]+a-Q.AABBBounds.height()):Q.setAttribute("y",h[0]),i}function QV(i,t,e,n,o,r,s,l,a){var h,d,u,c;const g=a._getCellStyle(i,t),f=bt("size",g,i,t,a),p=bt("spaceBetweenTextAndIcon",g,i,t,a),m=bt("defaultFill",g,i,t,a),v=bt("defaultStroke",g,i,t,a),C=bt("disableFill",g,i,t,a),S=bt("checkedFill",g,i,t,a),_=bt("checkedStroke",g,i,t,a),y=bt("disableCheckedFill",g,i,t,a),w=bt("disableCheckedStroke",g,i,t,a),A=bt("checkIconImage",g,i,t,a),R=bt("indeterminateIconImage",g,i,t,a),x=a.getCellValue(i,t),M=a.getCellOriginValue(i,t);let T,B,H=(h=x)!==null&&h!==void 0?h:"";se(x)?(T=x.checked,B=x.disable,H=(d=x.text)!==null&&d!==void 0?d:""):typeof x=="boolean"&&(T=x,H=""),T=a.stateManager.syncCheckedState(i,t,l.field,T);const k=to(i,t,a),P=a._getCellStyle(i,t),E=(u=P.autoWrapText)!==null&&u!==void 0?u:a.internalProps.autoWrapText,{lineClamp:F}=P,{checked:I,disable:L}=l;if(T==null||typeof T=="function"){const X=Ze(I,{col:i,row:t,table:a,context:null,value:x,dataValue:M});T=a.stateManager.syncCheckedState(i,t,l.field,X)}const D=Ze(L,{col:i,row:t,table:a,context:null,value:x,dataValue:M}),O=e==="auto",V=a.isAutoRowHeight(t),W={text:H.length===1?H[0]:H,maxLineWidth:O?1/0:n-(r[1]+r[3]+k)-f-p,textBaseline:"top",autoWrapText:E,lineClamp:F,wordBreak:"break-word",heightLimit:V?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:k,whiteSpace:H.length!==1||E?"normal":"no-wrap"},j={x:0,y:0,text:s.text?Object.assign({},s.text,W):W,icon:{width:Math.floor(f/1.4),height:Math.floor(f/1.4)},box:{width:f,height:f},spaceBetweenTextAndIcon:p,disabled:(c=B??D)!==null&&c!==void 0&&c};T==="indeterminate"?(j.checked=void 0,j.indeterminate=!0):(j.checked=T,j.indeterminate=void 0),m&&(j.box.fill=m),v&&(j.box.stroke=v),C&&(j.box.disableFill=C),S&&(j.box.checkedFill=S),_&&(j.box.checkedStroke=_),y&&(j.box.disableCheckedFill=y),w&&(j.box.disableCheckedStroke=w),A&&(j.icon.checkIconImage=A),R&&(j.icon.indeterminateIconImage=R);const $=new mr(j);return $.name="checkbox",$}function t9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f){var p,m,v,C,S,_,y,w,A,R,x,M;if(!i){const H=ds(o,r,g,c);(i=new ie({x:e,y:n,width:l,height:a,lineWidth:(m=(p=g==null?void 0:g.group)===null||p===void 0?void 0:p.lineWidth)!==null&&m!==void 0?m:void 0,fill:(C=(v=g==null?void 0:g.group)===null||v===void 0?void 0:v.fill)!==null&&C!==void 0?C:void 0,stroke:(_=(S=g==null?void 0:g.group)===null||S===void 0?void 0:S.stroke)!==null&&_!==void 0?_:void 0,strokeArrayWidth:H,strokeArrayColor:(w=(y=g==null?void 0:g.group)===null||y===void 0?void 0:y.strokeArrayColor)!==null&&w!==void 0?w:void 0,cursor:(R=(A=g==null?void 0:g.group)===null||A===void 0?void 0:A.cursor)!==null&&R!==void 0?R:void 0,lineDash:(M=(x=g==null?void 0:g.group)===null||x===void 0?void 0:x.lineDash)!==null&&M!==void 0?M:void 0,lineCap:"butt",clip:!0,cornerRadius:g.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i)}const{width:T,height:B}=e9(o,r,s,l,a,h,g,f,i,c);return l-=h[1]+h[3],a-=h[0]+h[2],i.forEachChildren(H=>{d==="center"?H.setAttribute("x",h[3]+H.attribute.x+(l-T)/2):d==="right"?H.setAttribute("x",h[3]+H.attribute.x+l-T):H.setAttribute("x",h[3]+H.attribute.x),u==="middle"?H.setAttribute("y",h[0]+H.attribute.y+(a-B)/2):u==="bottom"?H.setAttribute("y",h[0]+H.attribute.y+a-B):H.setAttribute("y",h[0]+H.attribute.y)}),i}function e9(i,t,e,n,o,r,s,l,a,h){var d,u;const c=h._getCellStyle(i,t);let g=bt("size",c,i,t,h),f=bt("innerRadius",c,i,t,h),p=bt("outerRadius",c,i,t,h);const m=bt("spaceBetweenTextAndIcon",c,i,t,h),v=bt("spaceBetweenRadio",c,i,t,h),C=bt("defaultFill",c,i,t,h),S=bt("defaultStroke",c,i,t,h),_=bt("disableFill",c,i,t,h),y=bt("checkedFill",c,i,t,h),w=bt("checkedStroke",c,i,t,h),A=bt("disableCheckedFill",c,i,t,h),R=bt("disableCheckedStroke",c,i,t,h);at(p)?g=2*p:p=Math.round(g/2),(!at(f)||f<0)&&(f=Math.round(p/7*3));const x=h.getCellValue(i,t),M=h.getCellOriginValue(i,t),T=to(i,t,h),B=h._getCellStyle(i,t),H=(d=B.autoWrapText)!==null&&d!==void 0?d:h.internalProps.autoWrapText,{lineClamp:k}=B,P=e==="auto",E=h.heightMode==="autoHeight",F={maxLineWidth:P?1/0:n-(r[1]+r[3]+T)-g-m,textBaseline:"top",autoWrapText:H,lineClamp:k,wordBreak:"break-word",heightLimit:E?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:T},I={x:0,y:0,text:s.text?Object.assign({},s.text,F):F,circle:{innerRadius:f,outerRadius:p},spaceBetweenTextAndIcon:m};C&&(I.circle.fill=C),S&&(I.circle.stroke=S),_&&(I.circle.disableFill=_),y&&(I.circle.checkedFill=y),w&&(I.circle.checkedStroke=w),A&&(I.circle.disableCheckedFill=A),R&&(I.circle.disableCheckedStroke=R);let L=0,D=0;const O=(u=l.radioDirectionInCell)!==null&&u!==void 0?u:"vertical";if(it(x))x.forEach((V,W)=>{const j=eT(V,M,W,i,t,l,H,I,h);j&&a.appendChild(j),j.id=`radio-${i}-${t}-${W}`,j.render();const $=j.AABBBounds;O==="vertical"?(j.setAttribute("y",D),D+=$.height()+(W!==x.length-1?v:0),L=Math.max(L,$.width())):O==="horizontal"&&(j.setAttribute("x",L),L+=$.width()+(W!==x.length-1?v:0),D=Math.max(D,$.height()))});else{const V=eT(x,M,void 0,i,t,l,H,I,h);V&&a.appendChild(V),V.id=`radio-${i}-${t}`,V.render();const W=V.AABBBounds;L=W.width(),D=W.height()}return{width:L,height:D}}function eT(i,t,e,n,o,r,s,l,a){const h=i9(i,t,e,n,o,r,a),d=n9(i,t,n,o,r,a),u=se(i)?i.text:ui(i)?"":i??"",c=St({},l,{checked:h,disabled:d,text:{text:u.length===1?u[0]:u,whiteSpace:u.length!==1||s?"normal":"no-wrap"},boundsPadding:0}),g=new Na(c);return g.name="radio",g}function i9(i,t,e,n,o,r,s){var l,a;const h=(l=r.radioCheckType)!==null&&l!==void 0?l:"column";let d,u;return se(i)?d=i.checked:typeof i=="boolean"&&(d=i),d=s.stateManager.syncRadioState(n,o,r.field,h,e,d),d!=null&&typeof d!="function"||(u=Ze(r.checked,{col:n,row:o,table:s,context:null,value:i,dataValue:t}),d=s.stateManager.syncRadioState(n,o,r.field,h,e,u)),(a=d??u)!==null&&a!==void 0&&a}function n9(i,t,e,n,o,r){var s;let l;se(i)&&(l=i.disable);const a=Ze(o.disable,{col:e,row:n,table:r,context:null,value:i,dataValue:t});return(s=l??a)!==null&&s!==void 0&&s}const Mr=new BO,Br=new Jr;function o9(i,t,e,n,o,r,s,l,a,h,d,u){var c,g,f,p,m,v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L;if(!i){const O=ds(o,r,d,h);u&&(i=h.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(g=(c=d==null?void 0:d.group)===null||c===void 0?void 0:c.lineWidth)!==null&&g!==void 0?g:void 0,fill:(p=(f=d==null?void 0:d.group)===null||f===void 0?void 0:f.fill)!==null&&p!==void 0?p:void 0,stroke:(v=(m=d==null?void 0:d.group)===null||m===void 0?void 0:m.stroke)!==null&&v!==void 0?v:void 0,strokeArrayWidth:O,strokeArrayColor:(S=(C=d==null?void 0:d.group)===null||C===void 0?void 0:C.strokeArrayColor)!==null&&S!==void 0?S:void 0,cursor:(y=(_=d==null?void 0:d.group)===null||_===void 0?void 0:_.cursor)!==null&&y!==void 0?y:void 0,lineDash:(A=(w=d==null?void 0:d.group)===null||w===void 0?void 0:w.lineDash)!==null&&A!==void 0?A:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius}),i&&i.role==="cell"||((i=new ie({x:e,y:n,width:s,height:l,lineWidth:(x=(R=d==null?void 0:d.group)===null||R===void 0?void 0:R.lineWidth)!==null&&x!==void 0?x:void 0,fill:(T=(M=d==null?void 0:d.group)===null||M===void 0?void 0:M.fill)!==null&&T!==void 0?T:void 0,stroke:(H=(B=d==null?void 0:d.group)===null||B===void 0?void 0:B.stroke)!==null&&H!==void 0?H:void 0,strokeArrayWidth:O,strokeArrayColor:(P=(k=d==null?void 0:d.group)===null||k===void 0?void 0:k.strokeArrayColor)!==null&&P!==void 0?P:void 0,cursor:(F=(E=d==null?void 0:d.group)===null||E===void 0?void 0:E.cursor)!==null&&F!==void 0?F:void 0,lineDash:(L=(I=d==null?void 0:d.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}const D=r9(o,r,s,l,a,h);return D&&i.appendChild(D),i}function r9(i,t,e,n,o,r){let s,l;const a=r.internalProps.layoutMap.getBody(i,t).sparklineSpec,h=r.getCellValue(i,t);if(!Array.isArray(h))return;const d=o[3],u=o[0];e-=o[1]+o[3];const c=n-=o[0]+o[2];if(typeof a=="function"){const S={col:i,row:t,dataValue:r.getCellOriginValue(i,t)||"",value:r.getCellValue(i,t)||"",rect:r.getCellRangeRelativeRect(r.getCellRange(i,t)),table:r};s=a(S),l=iT(s,d,u,e,n)}else s=a,l=iT(a,d,u,e,n);const g=[],f=[];let p,m;if(typeof s.xField=="object")Mr.domain(s.xField.domain),p=s.xField.field;else if(typeof s.xField=="string"){const S=h.map(_=>_[s.xField]);Mr.domain(S),p=s.xField}else Array.isArray(h)&&(Mr.domain(Array.from({length:h.length},(S,_)=>_)),p=s.xField);if(Mr.range([0,e]),typeof s.yField=="object")Br.domain(s.yField.domain),m=s.yField.field;else if(typeof s.yField=="string"){const S=nT(h,s.yField);Br.domain([Math.min(...S),Math.max(...S)]),m=s.yField}else if(Array.isArray(h)){const S=nT(h);Br.domain([Math.min(...S),Math.max(...S)]),m=s.yField}if(Br.range([0,n]),typeof s.xField=="object"&&Array.isArray(s.xField.domain)){const S=h.map(y=>y[s.xField.field]),_=s.xField.domain;for(let y=0;y<_.length;y++){let w=!1;for(let A=0;A<S.length;A++)if(_[y]===S[A]){const R=h[A];if(!z(R[p])||!z(R[m]))break;g.push({x:0+Mr.scale(R[p]),y:c-Br.scale(R[m]),defined:z(R[m])}),f.push(R),w=!0;break}w||(g.push({x:0+Mr.scale(_[y]),y:0,defined:!1}),f.push({[p]:_[y],[m]:null}))}}else for(let S=0;S<h.length;S++){const _=h[S];g.push({x:0+Mr.scale(p?_[p]:S),y:c-Br.scale(m?_[m]:_),defined:z(m?_[m]:_),rawData:_}),f.push(_)}const v=l.getChildByName("sparkline-line");v&&v.setAttribute("points",g),v.bandwidth=Mr.step(),v.min=Br.range()[0],v.max=Br.range()[1];const C=l.getChildByName("sparkline-symbol-group");if(C){const S=s.pointShowRule==="isolatedPoint";if(s.pointShowRule==="all")for(let _=0;_<g.length;_++){const{x:y,y:w,defined:A}=g[_];if(A){const R=ya({x:y,y:w});C.appendChild(R)}}else if(S)for(let _=0;_<g.length;_++){const{x:y,y:w,defined:A}=g[_];if(A&&(!g[_-1]||!g[_-1].defined)&&(!g[_+1]||!g[_+1].defined)){const R=ya({x:y,y:w});C.appendChild(R)}}}return l}function iT(i,t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R,x,M;let T;T=typeof i=="function"?i(null):i;const B=new ie({x:t,y:e,width:n,height:o,stroke:!1,fill:!1});if(B.name="sparkline",T.type==="line"){const H=un({x:0,y:0,curveType:T.smooth?"monotoneX":"linear",stroke:(l=(s=(r=T.line)===null||r===void 0?void 0:r.style)===null||s===void 0?void 0:s.stroke)!==null&&l!==void 0?l:"blue",lineWidth:(d=(h=(a=T.line)===null||a===void 0?void 0:a.style)===null||h===void 0?void 0:h.strokeWidth)!==null&&d!==void 0?d:2});H.name="sparkline-line",B.addChild(H),T.crosshair&&(H.hover=(c=(u=T.crosshair)===null||u===void 0?void 0:u.style)!==null&&c!==void 0?c:{stroke:"#000",interpolate:"linear"});const k=new ie({x:0,y:0,width:n,height:o,stroke:!1,fill:!1});k.name="sparkline-symbol-group",k.setTheme({symbol:{stroke:(p=(f=(g=T.point)===null||g===void 0?void 0:g.style)===null||f===void 0?void 0:f.stroke)!==null&&p!==void 0?p:"#000",lineWidth:(C=(v=(m=T.point)===null||m===void 0?void 0:m.style)===null||v===void 0?void 0:v.strokeWidth)!==null&&C!==void 0?C:1,fill:(y=(_=(S=T.point)===null||S===void 0?void 0:S.style)===null||_===void 0?void 0:_.fill)!==null&&y!==void 0?y:"#000",size:2*((R=(A=(w=T.point)===null||w===void 0?void 0:w.style)===null||A===void 0?void 0:A.size)!==null&&R!==void 0?R:3),symbolType:"circle"}}),B.addChild(k),k.hover=(M=(x=T.point)===null||x===void 0?void 0:x.hover)!==null&&M!==void 0&&M}return B}function nT(i,t){const e=[];for(let n=0;n<i.length;n++){const o=i[n];z(t)&&z(o[t])?e.push(o[t]):!z(t)&&z(o)&&e.push(o)}return e}const iv=fn();function s9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m){var v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt;const pt=g._getCellStyle(n,o),xt=wc("padding",pt,n,o,g);!((v=g.options.customConfig)===null||v===void 0)&&v.imageMargin?h=Yt((C=g.options.customConfig)===null||C===void 0?void 0:C.imageMargin):z(xt)&&(h=xt),!((S=f==null?void 0:f.text)===null||S===void 0)&&S.textAlign&&(d=(_=f==null?void 0:f.text)===null||_===void 0?void 0:_.textAlign),!((y=f==null?void 0:f.text)===null||y===void 0)&&y.textBaseline&&(u=(w=f==null?void 0:f.text)===null||w===void 0?void 0:w.textBaseline);const G=ds(n,o,f,g);let q,ot;if(m&&(q=g.scenegraph.highPerformanceGetCell(n,o,!0),q&&q.role==="cell"&&q.setAttributes({x:t,y:e,width:r,height:s,lineWidth:(R=(A=f==null?void 0:f.group)===null||A===void 0?void 0:A.lineWidth)!==null&&R!==void 0?R:void 0,fill:(M=(x=f==null?void 0:f.group)===null||x===void 0?void 0:x.fill)!==null&&M!==void 0?M:void 0,stroke:(B=(T=f==null?void 0:f.group)===null||T===void 0?void 0:T.stroke)!==null&&B!==void 0?B:void 0,strokeArrayWidth:G,strokeArrayColor:(k=(H=f==null?void 0:f.group)===null||H===void 0?void 0:H.strokeArrayColor)!==null&&k!==void 0?k:void 0,cursor:(E=(P=f==null?void 0:f.group)===null||P===void 0?void 0:P.cursor)!==null&&E!==void 0?E:void 0,lineDash:(I=(F=f==null?void 0:f.group)===null||F===void 0?void 0:F.lineDash)!==null&&I!==void 0?I:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})),q&&q.role==="cell"||(q=new ie({x:t,y:e,width:r,height:s,lineWidth:(D=(L=f==null?void 0:f.group)===null||L===void 0?void 0:L.lineWidth)!==null&&D!==void 0?D:void 0,fill:(V=(O=f==null?void 0:f.group)===null||O===void 0?void 0:O.fill)!==null&&V!==void 0?V:void 0,stroke:(j=(W=f==null?void 0:f.group)===null||W===void 0?void 0:W.stroke)!==null&&j!==void 0?j:void 0,strokeArrayWidth:G,strokeArrayColor:(X=($=f==null?void 0:f.group)===null||$===void 0?void 0:$.strokeArrayColor)!==null&&X!==void 0?X:void 0,cursor:(U=(K=f==null?void 0:f.group)===null||K===void 0?void 0:K.cursor)!==null&&U!==void 0?U:void 0,lineDash:(dt=(Q=f==null?void 0:f.group)===null||Q===void 0?void 0:Q.lineDash)!==null&&dt!==void 0?dt:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),q.role="cell",q.col=n,q.row=o,i==null||i.addCellGroup(q)),c){let mt=n,st=o;p&&(mt=p.start.col,st=p.start.row),ot=g.getCellIcons(mt,st)}let ct=0,_t=0;if(Array.isArray(ot)&&ot.length!==0){const{leftIconWidth:mt,rightIconWidth:st,absoluteLeftIconWidth:Ft,absoluteRightIconWidth:Ht}=Ac(ot,q,p,g);ct=mt,_t=st,q.forEachChildren(vt=>{vt.role==="icon-left"?vt.setAttribute("x",vt.attribute.x+h[3]):vt.role==="icon-right"?vt.setAttribute("x",vt.attribute.x+r-st-h[1]):vt.role==="icon-absolute-right"&&vt.setAttribute("x",vt.attribute.x+r-Ht-h[1])}),q.forEachChildren(vt=>{u==="middle"?vt.setAttribute("y",(s-vt.AABBBounds.height())/2):u==="bottom"?vt.setAttribute("y",s-vt.AABBBounds.height()-h[2]):vt.setAttribute("y",h[0])}),q._cellLeftIconWidth=ct,q._cellRightIconWidth=_t}const yt=g.getCellValue(n,o),ht=document.createElement("video");ht.addEventListener("loadeddata",()=>{a&&jx(n,o,ht.videoWidth,ht.videoHeight,g.scenegraph,h,q);const{width:mt,height:st,isMerge:Ft}=cl(q,g);if(l){const{width:Le,height:Fe}=_c(ht.videoWidth,ht.videoHeight,mt-h[1]-h[3],st-h[0]-h[2]),me=vm(0,0,mt,st,Le,Fe,d,u,h);et.setAttributes({width:Le,height:Fe,x:me.x,y:me.y,dx:0})}else et.setAttributes({x:h[3],y:h[0],width:mt-h[1]-h[3],height:st-h[2]-h[0],dy:0});Ft&&bm(q.mergeStartCol,q.mergeEndCol,q.mergeStartRow,q.mergeEndRow,g);const{width:Ht,height:vt}=cl(q,g),Pt=Math.floor(Math.min(Ht-h[1]-h[3],vt-h[2]-h[0])/2),_e=0+(Ht>et.attribute.width?et.attribute.x-0+et.attribute.width/2:Ht/2),ge=0+(vt>et.attribute.height?et.attribute.y-0+et.attribute.height/2:vt/2),gt=new ns({x:_e-Pt/2,y:ge-Pt/2,width:Pt,height:Pt,image:iv.play.svg,cursor:iv.play.cursor});gt.name="play-icon",q.appendChild(gt),g.scenegraph.updateNextFrame()}),ht.onerror=()=>{et.image=iv.damage_pic.svg},ht.src=yt,ht.setAttribute("preload","auto");const et=iu({x:h[3],y:h[0],width:r-h[1]-h[3],height:s-h[2]-h[0],image:ht,cursor:"pointer"});return et.name="image",et.keepAspectRatio=l,et.textAlign=d,et.textBaseline=u,q.appendChild(et),q}function l9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C){var S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q;const ot=i._getCellStyle(r,s),ct=wc("padding",ot,r,s,i);z(ct)&&(d=ct),!((S=m==null?void 0:m.text)===null||S===void 0)&&S.textAlign&&(u=(_=m==null?void 0:m.text)===null||_===void 0?void 0:_.textAlign),!((y=m==null?void 0:m.text)===null||y===void 0)&&y.textBaseline&&(c=(w=m==null?void 0:m.text)===null||w===void 0?void 0:w.textBaseline);const _t=i.isAutoRowHeight(s),yt=l==="auto",ht=(A=ot.autoWrapText)!==null&&A!==void 0?A:i.internalProps.autoWrapText,et=ot.lineClamp,mt=ds(r,s,m,i);let st;if(C&&(st=i.scenegraph.getCell(r,s,!0),st&&st.role==="cell"&&st.setAttributes({x:n,y:o,width:a,height:h,lineWidth:(x=(R=m==null?void 0:m.group)===null||R===void 0?void 0:R.lineWidth)!==null&&x!==void 0?x:void 0,fill:(T=(M=m==null?void 0:m.group)===null||M===void 0?void 0:M.fill)!==null&&T!==void 0?T:void 0,stroke:(H=(B=m==null?void 0:m.group)===null||B===void 0?void 0:B.stroke)!==null&&H!==void 0?H:void 0,strokeArrayWidth:mt??void 0,strokeArrayColor:(P=(k=m==null?void 0:m.group)===null||k===void 0?void 0:k.strokeArrayColor)!==null&&P!==void 0?P:void 0,cursor:(F=(E=m==null?void 0:m.group)===null||E===void 0?void 0:E.cursor)!==null&&F!==void 0?F:void 0,lineDash:(L=(I=m==null?void 0:m.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius})),st&&st.role==="cell"||(st=new ie({x:n,y:o,width:a,height:h,lineWidth:(O=(D=m==null?void 0:m.group)===null||D===void 0?void 0:D.lineWidth)!==null&&O!==void 0?O:void 0,fill:(W=(V=m==null?void 0:m.group)===null||V===void 0?void 0:V.fill)!==null&&W!==void 0?W:void 0,stroke:($=(j=m==null?void 0:m.group)===null||j===void 0?void 0:j.stroke)!==null&&$!==void 0?$:void 0,strokeArrayWidth:mt??void 0,strokeArrayColor:(K=(X=m==null?void 0:m.group)===null||X===void 0?void 0:X.strokeArrayColor)!==null&&K!==void 0?K:void 0,cursor:(Q=(U=m==null?void 0:m.group)===null||U===void 0?void 0:U.cursor)!==null&&Q!==void 0?Q:void 0,lineDash:(pt=(dt=m==null?void 0:m.group)===null||dt===void 0?void 0:dt.lineDash)!==null&&pt!==void 0?pt:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius}),st.role="cell",st.col=r,st.row=s,e==null||e.addCellGroup(st)),f&&st.appendChild(f),p){const Ft=t;let Ht;if(g){let vt=r,Pt=s;v&&(vt=v.start.col,Pt=v.start.row),Ht=i.getCellIcons(vt,Pt)}if(S4(st,Ht,Ft,d,yt,_t,ht,typeof et=="number"?et:void 0,st.attribute.width,st.attribute.height,u,c,i,m,v),(xt=m==null?void 0:m._vtable)===null||xt===void 0?void 0:xt.marked){const vt=Gp({x:st.attribute.width,y:0,startAngle:Math.PI/2,endAngle:Math.PI,outerRadius:6,fill:"#3073F2",pickable:!1});vt.name="mark",st.appendChild(vt)}}return f&&st.setAttributes({width:Math.max(st.attribute.width,(G=f.attribute.width)!==null&&G!==void 0?G:0),height:Math.max(st.attribute.height,(q=f.attribute.height)!==null&&q!==void 0?q:0)}),st}function a9(i,t,e,n,o,r,s,l,a,h){var d,u,c,g,f,p;i.dependField&&(o=(u=(d=a.getCellOriginRecord(r,s))===null||d===void 0?void 0:d[i.dependField])!==null&&u!==void 0?u:o),i.barType=(c=i.barType)!==null&&c!==void 0?c:"default",i.min=(g=Ze(i.min,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&g!==void 0?g:0,i.max=(f=Ze(i.max,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&f!==void 0?f:i.min+100;let m=0;m=h?a.getRowsHeight(h.start.row,h.end.row):a.getRowHeight(s);let v=e,C=m,S=0;at(a.theme._contentOffset)&&(S=a.theme._contentOffset);const _=new ie({x:-S,y:-S,width:v,height:C});_.name="progress-bar";const{showBar:y,barColor:w,barBgColor:A,barPositiveColor:R,barNegativeColor:x,barAxisColor:M,barRightToLeft:T,showBarMark:B,barMarkPositiveColor:H,barMarkNegativeColor:k,barMarkWidth:P,barMarkPosition:E}=t;let{barHeight:F,barBottom:I,barPadding:L}=t;L.length===1?L=[L[0],L[0],L[0],L[0]]:L.length===2?L=[L[0],L[1],L[0],L[1]]:L.length===3&&(L=[L[0],L[1],L[2],L[1]]),L=L.map((U,Q)=>{if(typeof U=="string"&&oc.endsWith(U,"%")){const dt=Number(U.substr(0,U.length-1));return Q===0||Q===2?m*dt/100:e*dt/100}return Number(U)});const D=Yt(bt("borderLineWidth",t,r,s,a)),O=Math.max(L[0],Math.ceil(D[0]/2)),V=Math.max(L[1],Math.floor(D[1]/2)),W=Math.max(L[2],Math.floor(D[2]/2)),j=Math.max(L[3],Math.ceil(D[3]/2));v-=V+j,C-=W+O,s===a.rowCount-1&&[0,"0"].includes(I)&&(C-=1);const $=O,X=j,K=v;if(typeof F=="string"&&oc.endsWith(F,"%")?(F=Number(F.substr(0,F.length-1)),F=C*F/100):F=Number(F),typeof I=="string"&&oc.endsWith(I,"%")?(I=Number(I.substr(0,I.length-1)),I=C*I/100):I=Number(I),Ze(y,{col:r,row:s,table:a,context:null,value:n,dataValue:o})){let U=`${o}`;oc.endsWith(U,"%")&&(U=U.substr(0,U.length-1));const Q=Number(U);if(isNaN(Q))return _;if(((p=i.barType)!==null&&p!==void 0?p:"default")==="default"){const dt=Q<i.min?0:Q>i.max?1:(Q-i.min)/(i.max-i.min),pt=v,xt=$+C-F-I;let G=Math.min(pt*dt,pt);const q=T?X+K-G:X;r!==a.colCount-1||dt!==1||T||(G-=1);const ot=Ze(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:dt});if(ot){const yt=ke({x:q,y:xt,width:pt,height:F,fill:ot});_.addChild(yt)}const ct=Ze(w,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:dt})||"#20a8d8",_t=ke({x:q,y:xt,width:G,height:F,fill:ct});_.addChild(_t)}else if(i.barType==="negative"){const dt=i.min<0?-i.min:0,pt=i.max>0?i.max:0,xt=dt/(dt+pt),G=1-xt,q=Q>0?Q/pt:0,ot=Q<0?-Q/dt:0,ct=v,_t=$+C-F-I,yt=X,ht=Ze(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q});if(ht){const me=ke({x:yt,y:_t,width:ct,height:F,fill:ht});_.addChild(me)}const et=T?G*ct:xt*ct,mt=Math.min(ct*xt*ot,ct),st=T?{left:yt+et,top:_t,width:mt,height:F}:{left:yt+et-mt,top:_t,width:mt,height:F},Ft=Ze(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:ot})||"#20a8d8",Ht=ke({x:st.left,y:st.top,width:st.width,height:st.height,fill:Ft});_.addChild(Ht);let vt=Math.min(ct*G*q,ct);r!==a.colCount-1||q!==1||T||(vt-=1);const Pt=T?{left:yt+et-vt,top:_t,width:vt,height:F}:{left:yt+et,top:_t,width:vt,height:F},_e=Ze(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q})||"#20a8d8",ge=ke({x:Pt.left,y:Pt.top,width:Pt.width,height:Pt.height,fill:_e});_.addChild(ge);const gt=T?st.left:Pt.left,Le=Ze(M,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q}),Fe=un({x:0,y:0,stroke:Le,lineWidth:1,lineDash:[2,2],points:[{x:gt,y:0},{x:gt,y:m}]});if(_.addChild(Fe),B&&(q||ot)){const me=P,Ve=[];let ne;if(q>0)if(ne=Ze(H,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:q})||"#20a8d8",E==="right"){const Mt=T?Pt.left+P/2:Pt.left+Pt.width-P/2;Ve.push({x:Mt,y:Pt.top}),Ve.push({x:Mt,y:Pt.top+Pt.height})}else E==="bottom"&&(Ve.push({x:Pt.left,y:Pt.top+Pt.height-P/2}),Ve.push({x:Pt.left+Pt.width,y:Pt.top+Pt.height-P/2}));else if(ot>0)if(ne=Ze(k,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:ot})||"#20a8d8",E==="right"){const Mt=T?st.left+st.width-P/2:st.left+P/2;Ve.push({x:Mt,y:st.top}),Ve.push({x:Mt,y:st.top+st.height})}else E==="bottom"&&(Ve.push({x:st.left,y:st.top+st.height-P/2}),Ve.push({x:st.left+st.width,y:st.top+st.height-P/2}));const Rt=un({x:0,y:0,stroke:ne,lineWidth:me,points:Ve});_.addChild(Rt)}}else if(i.barType==="negative_no_axis"){const dt=i.min<0?-i.min:0,pt=i.max>0?i.max:0,xt=Math.max(dt,pt),G=xt===0?0:Math.abs(Q)/xt,q=v;let ot=Math.min(q*G,q);r!==a.colCount-1||G!==1||T||(ot-=1);const ct=$+C-F-I,_t=T?X+K-ot:X,yt=Ze(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G});if(yt){const st=ke({x:_t,y:ct,width:q,height:F,fill:yt});_.addChild(st)}const ht={left:_t,top:ct,width:ot,height:F};let et;et=Q>=0?Ze(R,{col:r,row:s,table:a,context:null,value:n,percentile:G,dataValue:o})||"#20a8d8":Ze(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G})||"#20a8d8";const mt=ke({x:ht.left,y:ht.top,width:ht.width,height:ht.height,fill:et});if(_.addChild(mt),B&&Q){const st=P,Ft=[];let Ht;if(Ht=Q>=0?Ze(H,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G})||"#20a8d8":Ze(k,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:G})||"#20a8d8",E==="right"){const Pt=T?ht.left+P/2:ht.left+ht.width-P/2;Ft.push({x:Pt,y:ht.top}),Ft.push({x:Pt,y:ht.top+ht.height})}else E==="bottom"&&(Ft.push({x:ht.left,y:ht.top+ht.height-P/2}),Ft.push({x:ht.left+ht.width,y:ht.top+ht.height-P/2}));const vt=un({x:0,y:0,stroke:Ht,lineWidth:st,points:Ft});_.addChild(vt)}}}return _}function h9(i,t,e,n,o,r){var s,l,a,h,d,u,c,g,f;if(e!=null&&e.zero&&(i=Math.min(i,0),t=Math.max(t,0)),e==null?void 0:e.expand){const v=i,C=t;z(e.expand.min)&&(i=v-(C-v)*e.expand.min),z(e.expand.max)&&(t=C+(C-v)*e.expand.max)}let p,m;if(at(e==null?void 0:e.min)&&(i=e.min),at(e==null?void 0:e.max)&&(t=e.max),(e==null?void 0:e.type)==="log"?(p=new Ia,p.base((s=e==null?void 0:e.base)!==null&&s!==void 0?s:10)):(e==null?void 0:e.type)==="symlog"?(p=new Da,p.constant((l=e==null?void 0:e.constant)!==null&&l!==void 0?l:10)):p=new Jr,p.domain([i,t],!!(e!=null&&e.nice)),e==null?void 0:e.nice){let v=(u=(h=(a=e.tick)===null||a===void 0?void 0:a.forceTickCount)!==null&&h!==void 0?h:(d=e.tick)===null||d===void 0?void 0:d.tickCount)!==null&&u!==void 0?u:10;oe(v)&&(v=v({axisLength:o,labelStyle:(g=(c=e==null?void 0:e.label)===null||c===void 0?void 0:c.style)!==null&&g!==void 0?g:{fontSize:yh.LABEL_FONT_SIZE}})),e.niceType==="accurateFirst"&&(v=Math.max(10,v)),Tt(e.min)&&Tt(e.max)?p.nice(v):z(e.min)&&Tt(e.max)?p.niceMax(v):Tt(e.min)&&z(e.max)&&p.niceMin(v)}return delete p._niceType,r||(m=p.ticks(at(e==null?void 0:e.tickCount)?e==null?void 0:e.tickCount:5,{noDecimals:(f=e==null?void 0:e.tick)===null||f===void 0?void 0:f.noDecimals})),{range:p.domain(),ticks:m}}const Sg=()=>{Bt.registerFunction("createChartCellGroup",ZV),Bt.registerFunction("getAxisDomainRangeAndLabels",h9)},xg=()=>{Bt.registerFunction("createCheckboxCellGroup",JV)},Rg=()=>{Bt.registerFunction("createImageCellGroup",A4)},Ag=()=>{Bt.registerFunction("createProgressBarCell",a9)},Tg=()=>{Bt.registerFunction("createRadioCellGroup",t9)},Mg=()=>{Bt.registerFunction("createSparkLineCellGroup",o9)},Al=()=>{Bt.registerFunction("createTextCellGroup",l9)},Bg=()=>{Bt.registerFunction("createVideoCellGroup",s9)};vg(),bg(),Cg(),yg(),_g(),wg(),YV(),Sg(),xg(),Rg(),Ag(),Tg(),Mg(),Al(),Bg();class d9 extends KA{}Al();class u9 extends KA{}function c9(i,t,e,n,o,r){const s=r.columnHeaderLevelCount,l=[],a=[];for(let c=0;c<e.length;c++)n.includes(e[c])||a.push(o[c]);for(let c=0;c<n.length;c++)if(!e.includes(n[c])){const g={col:i,row:s+c};l.push(g)}let h=r.getParentCellId(i,t),d=r.getRowHeaderCellAddressByCellId(h);const u=[];for(d&&u.push(d);h;)h=r.getParentCellId(d.col,d.row),h&&(d=r.getRowHeaderCellAddressByCellId(h),u.push(d));return{addCellPositions:l,removeCellPositions:a,updateCellPositions:u}}const oT={startInTotal:0,level:0};class Jo{constructor(t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y;this.colIndex=0,this._showHeader=!0,this.columnHeaderObjs=[],this.rowHeaderObjs=[],this._cornerHeaderCellFullPathIds=[],this._columnHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds_FULL=[],this._cornerHeaderCellIds=[],this._columnHeaderCellIds=[],this._rowHeaderCellIds=[],this._rowHeaderCellIds_FULL=[],this._columnWidths=[],this.columnPaths=[],this._headerObjects=[],this._headerObjectMap={},this._indicators=[],this.indicatorsAsCol=!0,this.hideIndicatorName=!1,this._showRowHeader=!0,this._showColumnHeader=!0,this._indicatorShowType="column",this.rowHierarchyTextStartAlignment=!1,this.rowDimensionKeys=[],this.colDimensionKeys=[],this.indicatorKeys=[],this.indicatorDimensionKey=ji,this._rowHeaderExtensionTree={},this._extensionRowDimensionKeys=[],this.fullRowDimensionKeys=[],this.leftRowSeriesNumberColumnCount=0,this.rightRowSeriesNumberColumnCount=0,this._useGetBodyCache=!1,this._getBodyCache=new Map,this._useHeaderPathCache=!1,this._colHeaderPathCache=new Map,this._rowHeaderPathCache=new Map,this.sharedVar=t.layoutNodeId,this._table=t,t.options.rowHierarchyType==="tree"&&(this.extensionRows=t.options.extensionRows),this.dataset=e,this._largeCellRangeCache=[],this._CellHeaderPathMap=new Map,this.rowTree=t.internalProps.rowTree,this.columnTree=t.internalProps.columnTree,this.rowsDefine=(r=t.internalProps.rows)!==null&&r!==void 0?r:[],this.columnsDefine=(s=t.internalProps.columns)!==null&&s!==void 0?s:[],this.indicatorsDefine=(l=t.internalProps.indicators)!==null&&l!==void 0?l:[],this.indicatorTitle=t.options.indicatorTitle,this.indicatorsAsCol=(a=t.options.indicatorsAsCol)===null||a===void 0||a,this.hideIndicatorName=(h=t.options.hideIndicatorName)!==null&&h!==void 0&&h,this.showRowHeader=(d=t.options.showRowHeader)===null||d===void 0||d,this.showColumnHeader=(u=t.options.showColumnHeader)===null||u===void 0||u,this.rowHeaderTitle=t.options.rowHeaderTitle,this.columnHeaderTitle=t.options.columnHeaderTitle,this.rowHierarchyType=(c=t.options.rowHierarchyType)!==null&&c!==void 0?c:"grid",this.rowExpandLevel=(g=t.options.rowExpandLevel)!==null&&g!==void 0?g:1,this.rowHierarchyIndent=(f=t.options.rowHierarchyIndent)!==null&&f!==void 0?f:20,this.rowHierarchyTextStartAlignment=t.options.rowHierarchyTextStartAlignment,this.cornerSetting=Object.assign({titleOnDimension:"column",forceShowHeader:!1},t.options.corner),e&&(this.rowTree=e.rowHeaderTree,this.columnTree=e.colHeaderTree),(p=this.indicatorsDefine)===null||p===void 0||p.forEach(x=>{typeof x=="string"?this.indicatorKeys.push(x):this.indicatorKeys.push(x.indicatorKey)}),this.columnDimensionTree=n,this.rowDimensionTree=o,this.colDimensionKeys=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this.resetRowHeaderLevelCount(),this._table.isPivotChart()&&(this.hasTwoIndicatorAxes=this.indicatorsDefine.some(x=>{var M,T;if(x.chartSpec&&x.chartSpec.series&&x.chartSpec.series.length>1){const B=(T=(M=x.chartSpec.axes)!==null&&M!==void 0?M:this._table.pivotChartAxes)!==null&&T!==void 0?T:[];if(!B.length||B.every(H=>H.orient!==(this.indicatorsAsCol?"top":"right")||H.visible!==!1))return!0}return!1})),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=$0(this._rowHeaderCellFullPathIds_FULL),t.options.rowHierarchyType==="tree"&&((m=this.extensionRows)===null||m===void 0?void 0:m.length)>=1&&(this.generateExtensionRowTree(),this.extensionRows.forEach(x=>{const M=[];x.rows.forEach(T=>{typeof T=="string"?M.push(T):M.push(T.dimensionKey)}),this._extensionRowDimensionKeys.push(M),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(M)})),this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);let w,A=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();!this.dataset||this._table.isPivotChart()||((C=(v=this.dataset.records)===null||v===void 0?void 0:v.length)!==null&&C!==void 0?C:0)!==0||this.dataset.customColTree||(A=this.columnsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol&&A.push(this.indicatorDimensionKey)),A=this.columnHeaderTitle?[""].concat(A):A;let R=[];if(this.rowHierarchyType==="tree"&&((S=this.extensionRows)===null||S===void 0?void 0:S.length)>=1){const x=[];x.push(this.rowDimensionKeys[0]),this._extensionRowDimensionKeys.forEach(M=>{x.push(M[0])}),R=this.extensionRows.reduce((M,T)=>M.concat(T.rows),[]),w=this.rowHeaderTitle?[""].concat(x):x}else w=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),!this.dataset||this._table.isPivotChart()||((y=(_=this.dataset.records)===null||_===void 0?void 0:_.length)!==null&&y!==void 0?y:0)!==0||this.dataset.customRowTree||(w=this.rowsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol||w.push(this.indicatorDimensionKey)),w=this.rowHeaderTitle?[""].concat(w):w;this.cornerHeaderObjs=this._addCornerHeaders(A,w,this.columnsDefine.concat(...this.rowsDefine,...R)),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((x,M)=>(x[M.id]=M,x),{}),this.indicatorsAsCol&&!this.hideIndicatorName?this._indicatorShowType="column":this.indicatorsAsCol||this.hideIndicatorName?this._indicatorShowType="none":this._indicatorShowType="row",this.generateCellIdsConsiderHideHeader(),this.setPagination(t.options.pagination),this._table.isPivotChart()&&(this._chartItemSpanSize=0,this._chartItemBandSize=0,this._indicators.find(x=>{var M,T,B,H,k,P,E,F;!((M=x==null?void 0:x.style)===null||M===void 0)&&M.padding&&(this._chartPadding=x.style.padding),!((T=x.chartSpec)===null||T===void 0)&&T.barWidth&&typeof x.chartSpec.barWidth=="number"&&(this._chartItemSpanSize=(B=x.chartSpec)===null||B===void 0?void 0:B.barWidth);const I=(k=(H=x.chartSpec)===null||H===void 0?void 0:H.axes)===null||k===void 0?void 0:k.find(L=>L.type==="band");return I!=null&&I.bandSize&&(this._chartItemBandSize=I==null?void 0:I.bandSize,this._chartPaddingInner=(P=it(I.paddingInner)?I.paddingInner[0]:I.paddingInner)!==null&&P!==void 0?P:0,this._chartPaddingOuter=(E=it(I.paddingOuter)?I.paddingOuter[0]:I.paddingOuter)!==null&&E!==void 0?E:0),this._chartItemSpanSize>0||((F=x.chartSpec.series)===null||F===void 0||F.find(L=>(L.barWidth&&typeof L.barWidth=="number"&&(this._chartItemSpanSize=L.barWidth),this._chartItemSpanSize>0)),!1)})),this.handleRowSeriesNumber(t.internalProps.rowSeriesNumber),this.setColumnWidths()}handleRowSeriesNumber(t){var e,n;t&&(Array.isArray(t)?this.rowSeriesNumberColumn=t.map(o=>{var r,s;return{id:"",title:o.title,define:o,cellType:(r=o.cellType)!==null&&r!==void 0?r:"text",headerType:(s=o.cellType)!==null&&s!==void 0?s:"text",width:o.width,style:o.style,format:o.format,field:o.field,icon:o.icon}}):this.rowSeriesNumberColumn=[{id:"",title:t.title,define:t,cellType:(e=t.cellType)!==null&&e!==void 0?e:"text",headerType:(n=t.cellType)!==null&&n!==void 0?n:"text",style:t.style,width:t.width,format:t.format,field:"",icon:t.icon,isChildNode:!1}],this.leftRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!0),this.rightRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!1),this.leftRowSeriesNumberColumnCount=this.leftRowSeriesNumberColumn.length,this.rightRowSeriesNumberColumnCount=this.rightRowSeriesNumberColumn.length)}_generateColHeaderIds(){var t,e,n,o,r,s,l,a;if(((t=this.columnDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1){let h=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&this.indicatorsAsCol&&this.columnDimensionTree.totalLevel<this.columnHeaderLevelCount){h=this.columnHeaderLevelCount-this.columnDimensionTree.totalLevel;for(let d=0;d<h;d++)this._columnHeaderCellFullPathIds.unshift([])}this._addHeaders(this._columnHeaderCellFullPathIds,h,this.columnDimensionTree.tree.children,[],this.columnHeaderObjs)}if(this.columnHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const h=++this.sharedVar.seqId,d=Array(this.colCount-this.rowHeaderLevelCount-this.rightFrozenColCount).fill(h);this._columnHeaderCellFullPathIds.unshift(d);const u={id:h,title:typeof this.columnHeaderTitle.title=="string"?this.columnHeaderTitle.title:this.columnsDefine.reduce((c,g)=>typeof g=="string"?c:c+(c?`/${g.title}`:`${g.title}`),""),field:void 0,headerType:(r=(o=this.columnHeaderTitle)===null||o===void 0?void 0:o.headerType)!==null&&r!==void 0?r:"text",style:(s=this.columnHeaderTitle)===null||s===void 0?void 0:s.headerStyle,define:{id:h,disableHeaderHover:!!(!((l=this.columnHeaderTitle)===null||l===void 0)&&l.disableHeaderHover),disableHeaderSelect:!!(!((a=this.columnHeaderTitle)===null||a===void 0)&&a.disableHeaderSelect)}};this.columnHeaderObjs.push(u),this._headerObjects[h]=u}}_generateRowHeaderIds(){var t,e,n,o,r,s,l,a,h,d;if(((t=this.rowDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1)if(this.rowHierarchyType==="tree")this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs);else{let u=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&!this.indicatorsAsCol&&this.rowDimensionTree.totalLevel<this.rowHeaderLevelCount){u=this.rowHeaderLevelCount-this.rowDimensionTree.totalLevel;for(let c=0;c<u;c++)this._rowHeaderCellFullPathIds_FULL.unshift([])}this._addHeaders(this._rowHeaderCellFullPathIds_FULL,u,this.rowDimensionTree.tree.children,[],this.rowHeaderObjs)}if(this.rowHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const u=++this.sharedVar.seqId,c=Array((r=(o=this._rowHeaderCellFullPathIds_FULL[0])===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:this.rowDimensionTree.tree.size).fill(u);this._rowHeaderCellFullPathIds_FULL.unshift(c);const g={id:u,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((f,p)=>typeof p=="string"?f:f+(f?`/${p.title}`:`${p.title}`),""),field:void 0,headerType:(l=(s=this.rowHeaderTitle)===null||s===void 0?void 0:s.headerType)!==null&&l!==void 0?l:"text",style:(a=this.rowHeaderTitle)===null||a===void 0?void 0:a.headerStyle,define:{id:u,disableHeaderHover:!!(!((h=this.rowHeaderTitle)===null||h===void 0)&&h.disableHeaderHover),disableHeaderSelect:!!(!((d=this.rowHeaderTitle)===null||d===void 0)&&d.disableHeaderSelect)}};this.rowHeaderObjs.push(g),this._headerObjects[u]=g}}_addHeaders(t,e,n,o,r){const s=this;t[e]||function(l){const a=t[l]=[];if(s.colIndex===0)return a;const h=t[l-1];for(let d=0;d<(h==null?void 0:h.length);d++)a[d]=h[d]}(e);for(let l=0;l<n.length;l++){const a=n[l];t8(a,t,r,o,e,this)}}_addHeadersForTreeMode(t,e,n,o,r,s,l,a){const h=this;t[e]||function(d){const u=t[d]=[];if(h.colIndex===0)return u;const c=t[d-1];for(let g=0;g<(c==null?void 0:c.length);g++)u[g]=c[g]}(e);for(let d=0;d<n.length;d++){const u=n[d];e8(u,t,a,o,e,r,s,l,this)}}_addCornerHeaders(t,e,n){var o,r;const s=[];if(this.cornerSetting.titleOnDimension==="all")if(this.indicatorsAsCol){let l=-1;t&&t.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}),e&&e.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[l]||(this._cornerHeaderCellFullPathIds[l]=[]),this._cornerHeaderCellFullPathIds[l][h]=c})}else{let l=-1;e&&e.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f;for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c}),t&&t.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h][l]=c})}else if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="column"){const l=((o=this.cornerSetting)===null||o===void 0?void 0:o.titleOnDimension)==="row"?e:t;l&&l.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};if(s[c]=f,this._headerObjects[c]=f,this.cornerSetting.titleOnDimension==="column"){this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}else if(this.cornerSetting.titleOnDimension==="row")for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c})}else{const l=++this.sharedVar.seqId,a={id:l,title:"",field:"维度名称",style:this.cornerSetting.headerStyle,headerType:(r=this.cornerSetting.headerType)!==null&&r!==void 0?r:"text",define:{dimensionKey:"维度名称",id:l,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect}};s[l]=a,this._headerObjects[l]=a;for(let h=0;h<this.columnHeaderLevelCount;h++)for(let d=0;d<this.rowHeaderLevelCount;d++)this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]),this._cornerHeaderCellFullPathIds[h][d]=l}return s}generateExtensionRowTree(){this.extensionRows.forEach((t,e)=>{const n=this._rowHeaderCellFullPathIds_FULL;this._rowHeaderCellFullPathIds_FULL=[],n.forEach((o,r)=>{const s=o[o.length-1];let l,a;if(this.colIndex=0,typeof t.rowTree=="function"){const d=this.findFullCellIds(o);l=t.rowTree(d.map(u=>({dimensionKey:this._headerObjects[u].field,value:this._headerObjects[u].title})))}else l=Pe(t.rowTree);this._rowHeaderExtensionTree[s]?(this._rowHeaderExtensionTree[s].reset(this._rowHeaderExtensionTree[s].tree.children,!0),a=this._rowHeaderExtensionTree[s]):(a=new Me(l??[],this.sharedVar,this.rowHierarchyType,void 0),this._rowHeaderExtensionTree[s]=a);const h=[];this._addHeadersForTreeMode(h,0,a.tree.children,[],a.totalLevel,!0,t.rows,this.rowHeaderObjs);for(let d=0;d<h[0].length;d++)this._rowHeaderCellFullPathIds_FULL.push(o.concat(h[0][d]))})})}setColumnWidths(){var t,e,n;const o=new Array(this.colCount).fill(void 0);if(this.leftRowSeriesNumberColumnCount&&(o[0]=this.leftRowSeriesNumberColumn[0]),this.showHeader&&this.showRowHeader)if(this.rowHeaderTitle&&(o[0+this.leftRowSeriesNumberColumnCount]={}),this.rowHierarchyType==="tree"){const r=this.rowDimensionKeys[0];if(r){const s=(t=this.rowsDefine)===null||t===void 0?void 0:t.find(l=>typeof l!="string"&&l.dimensionKey===r);s&&(o[0+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:s.width,minWidth:s.minWidth,maxWidth:s.maxWidth})}(e=this._extensionRowDimensionKeys)===null||e===void 0||e.forEach((s,l)=>{var a;const h=s[0];if(h){const d=(a=this.extensionRows[l].rows)===null||a===void 0?void 0:a.find(u=>typeof u!="string"&&u.dimensionKey===h);d&&(o[l+1+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth})}})}else(this.rowDimensionTree.totalLevel>0?this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr():this.rowsDefine.map(r=>typeof r=="string"?r:r.dimensionKey)).forEach((r,s)=>{var l;const a=(l=this.rowsDefine)===null||l===void 0?void 0:l.find(h=>typeof h!="string"&&h.dimensionKey===r);a&&(o[s+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:a.width,minWidth:a.minWidth,maxWidth:a.maxWidth})});if(this.indicatorsAsCol)for(let r=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;r<this.colCount;r++){const s=this.getBody(r,this.columnHeaderLevelCount);o[r]={width:s==null?void 0:s.width,minWidth:s==null?void 0:s.minWidth,maxWidth:s==null?void 0:s.maxWidth}}else{let r,s,l,a=0;(n=this._indicators)===null||n===void 0||n.forEach((h,d)=>{var u,c;typeof h.width=="number"?a=Math.max(h.width,a):h.width==="auto"&&(l=!0),typeof h.minWidth=="number"&&(s=Math.max(h.minWidth,(u=s)!==null&&u!==void 0?u:0)),typeof h.maxWidth=="number"&&(r=Math.min(h.maxWidth,(c=r)!==null&&c!==void 0?c:Number.MAX_VALUE))}),a=a>0?a:l?"auto":void 0,o.fill({width:a,minWidth:s,maxWidth:r},this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount,this.colCount-this.rightFrozenColCount)}this._columnWidths=o}get columnWidths(){return this._columnWidths}getColumnWidthDefined(t){return this._columnWidths[t]}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader=t}get showColumnHeader(){return this._showColumnHeader}set showColumnHeader(t){this._showColumnHeader=t}get showRowHeader(){return this._showRowHeader}set showRowHeader(t){this._showRowHeader=t}get columnHeaderTitle(){return this._columnHeaderTitle}set columnHeaderTitle(t){this._columnHeaderTitle=t}get rowHeaderTitle(){return this._rowHeaderTitle}set rowHeaderTitle(t){this._rowHeaderTitle=t}getHeaderFieldKey(t,e){}getCellLocation(t,e){return this.isCornerHeader(t,e)?"cornerHeader":this.isColumnHeader(t,e)?"columnHeader":this.isRowHeader(t,e)?"rowHeader":"body"}isHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||e>=0&&e<this.columnHeaderLevelCount||t>=this.colCount-this.rightHeaderColCount||e>=this.rowCount-this.bottomHeaderRowCount}isCornerHeader(t,e){return t>=0&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isColumnHeader(t,e){return t>=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isRowHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=this.columnHeaderLevelCount}isFrozen(t,e){return this.isFrozenColumn(t)||this.isRightFrozenColumn(t)||this.isBottomFrozenRow(e)||this.isFrozenRow(e)||this.isSeriesNumberInBody(t,e)||this.isSeriesNumberInHeader(t,e)}isFrozenColumn(t,e){if(z(e)){if(t>=0&&t<this.frozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.frozenColCount>0&&t>=0&&t<this.frozenColCount)return!0;return!1}isRightFrozenColumn(t,e){if(z(e)){if(t>=this.colCount-this.rightFrozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.rightFrozenColCount>0&&t>=this.colCount-this.rightFrozenColCount)return!0;return!1}isFrozenRow(t,e){if(z(e)){if(e>=0&&e<this.frozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.frozenRowCount>0&&e>=0&&e<this.frozenRowCount)return!0;return!1}isBottomFrozenRow(t,e){if(z(e)){if(e>=this.rowCount-this.bottomFrozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.bottomFrozenRowCount>0&&e>=this.rowCount-this.bottomFrozenRowCount)return!0;return!1}isLeftTopCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=0&&e<this.frozenRowCount}isLeftBottomCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}isRightTopCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=0&&e<this.frozenRowCount}isRightBottomCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}getColumnHeaderRange(){return{start:{col:this.rowHeaderLevelCount,row:0},end:{col:this.colCount-1,row:this.columnHeaderLevelCount-1}}}getRowHeaderRange(){return{start:{col:0,row:this.columnHeaderLevelCount},end:{col:this.rowHeaderLevelCount-1,row:this.rowCount-1}}}getCornerHeaderRange(){return{start:{col:0,row:0},end:{col:this.rowHeaderLevelCount-1,row:this.columnHeaderLevelCount-1}}}getBodyRange(){return{start:{col:this.rowHeaderLevelCount,row:this.columnHeaderLevelCount},end:{col:this.colCount-1,row:this.rowCount-1}}}resetCellIds(){}get frozenColCount(){return this._table.internalProps.frozenColCount?this.colCount>this._table.internalProps.frozenColCount?this._table.internalProps.frozenColCount:this.colCount:0}get frozenRowCount(){return this._table.internalProps.frozenRowCount?this.rowCount>=this._table.internalProps.frozenRowCount?this._table.internalProps.frozenRowCount:this.rowCount:0}get headerLevelCount(){return this.columnHeaderLevelCount}resetColumnHeaderLevelCount(){var t,e,n,o,r,s,l,a,h,d,u;if(this.showHeader&&this.showColumnHeader){if(this._table.isPivotChart()&&this.indicatorsAsCol&&!(!((e=(t=this.dataset)===null||t===void 0?void 0:t.colKeys)===null||e===void 0)&&e.length)&&((o=(n=this.columnDimensionTree)===null||n===void 0?void 0:n.tree)===null||o===void 0?void 0:o.level)===0&&!this.hasTwoIndicatorAxes)return void(this.columnHeaderLevelCount=0);let c=this.indicatorsAsCol&&this.hideIndicatorName&&this.colDimensionKeys[this.colDimensionKeys.length-1]===this.indicatorDimensionKey?this.columnDimensionTree.totalLevel-1:this.columnDimensionTree.totalLevel;return c===0&&this.dataset&&!(!((r=this.dataset.customColTree)===null||r===void 0)&&r.length)?this.cornerSetting.titleOnDimension==="row"&&this.cornerSetting.forceShowHeader?c=1:this._table.isPivotChart()||((l=(s=this.dataset.records)===null||s===void 0?void 0:s.length)!==null&&l!==void 0?l:0)!==0||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(a=this.columnsDefine.length)!==null&&a!==void 0?a:0):!this.dataset||this._table.isPivotChart()||((d=(h=this.dataset.records)===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0)!==0||this.dataset.customColTree||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(u=this.columnsDefine.length)!==null&&u!==void 0?u:0,!this.hideIndicatorName&&this.indicatorsAsCol&&c++),this.columnHeaderTitle&&(c+=1),this._table.isPivotChart()&&this.indicatorsAsCol&&!this.hasTwoIndicatorAxes&&_h(this.indicatorsDefine)&&(c-=1),void(this.columnHeaderLevelCount=c)}this.columnHeaderLevelCount=this.indicatorsAsCol?this.hideIndicatorName?0:1:0}resetRowHeaderLevelCount(){var t,e,n,o,r,s,l,a;if(this.showHeader&&this.showRowHeader){if(this.rowHierarchyType==="tree"){const u=(e=(t=this.extensionRows)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0;return this.rowHeaderTitle?void(this.rowHeaderLevelCount=2+u):void(this.rowHeaderLevelCount=1+u)}const h=this.rowDimensionTree.totalLevel;let d=h;return d===0&&this.dataset&&!(!((n=this.dataset.customRowTree)===null||n===void 0)&&n.length)?this.cornerSetting.titleOnDimension==="column"&&this.cornerSetting.forceShowHeader?d=1:this._table.isPivotChart()||((r=(o=this.dataset.records)===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:0)!==0||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=(s=this.rowsDefine.length)!==null&&s!==void 0?s:0):!this.dataset||this._table.isPivotChart()||((a=(l=this.dataset.records)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)!==0||this.dataset.customRowTree||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=this.rowsDefine.length,this.hideIndicatorName||this.indicatorsAsCol||d++),!this.indicatorsAsCol&&this.hideIndicatorName&&this.rowDimensionKeys[this.rowDimensionKeys.length-1]===this.indicatorDimensionKey&&(d=h-1),this.rowHeaderTitle&&(d+=1),void(this.rowHeaderLevelCount=d)}this.rowHeaderLevelCount=this.indicatorsAsCol||this.hideIndicatorName?0:1}get columnHeaderLevelCount(){return this._columnHeaderLevelCount}set columnHeaderLevelCount(t){this._columnHeaderLevelCount=t}get rowHeaderLevelCount(){return this._rowHeaderLevelCount}set rowHeaderLevelCount(t){this._rowHeaderLevelCount=t}get colCount(){var t;return(this.columnDimensionTree.totalLevel>0||this._table.isPivotChart()||((t=this.dataset.records)===null||t===void 0?void 0:t.length)>0||this.dataset.records&&!Array.isArray(this.dataset.records)?this.columnDimensionTree.tree.size:0)+this.rowHeaderLevelCount+this.rightHeaderColCount+this.leftRowSeriesNumberColumnCount}get rowCount(){var t,e,n,o;return((this._table.records||this.dataset.records)&&(!Array.isArray(this._table.records)||this._table.records.length>0)&&((t=this._indicators)===null||t===void 0?void 0:t.length)>0&&!(!((e=this._rowHeaderCellIds)===null||e===void 0)&&e.length)?1:(o=(n=this._rowHeaderCellIds)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)+this.columnHeaderLevelCount+this.bottomHeaderRowCount}get bodyRowSpanCount(){return this.rowDimensionTree.tree.size}get bottomFrozenRowCount(){if(!this._table.isPivotChart())return this._table.internalProps.bottomFrozenRowCount?this.rowCount-this.headerLevelCount>=this._table.internalProps.bottomFrozenRowCount?this._table.internalProps.bottomFrozenRowCount:this.rowCount-this.headerLevelCount:0;if(this.indicatorKeys.length>=1&&_h(this.indicatorsDefine)){const t=this._table.pivotChartAxes.find(e=>e.orient==="bottom");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}return 0}get rightFrozenColCount(){if(!this._table.isPivotChart())return this._table.internalProps.rightFrozenColCount?this.colCount-this.rowHeaderLevelCount>=this._table.internalProps.rightFrozenColCount?this._table.internalProps.rightFrozenColCount:this.colCount-this.rowHeaderLevelCount:0;const t=this._table.pivotChartAxes.find(e=>e.orient==="right");return(t==null?void 0:t.visible)===!1||this.indicatorsAsCol?0:this.hasTwoIndicatorAxes?1:0}get bodyRowCount(){return this.rowCount-this.bottomFrozenRowCount-this.headerLevelCount}get bodyColCount(){return this.colCount-this.rightFrozenColCount-this.rowHeaderLevelCount}get headerObjects(){return this._headerObjects}get columnObjects(){return this._indicators}getCellId(t,e){var n,o,r,s,l;if(e>=0&&t>=0){if(this.isSeriesNumber(t,e))return"";if(this.isCornerHeader(t,e))return(n=this._cornerHeaderCellIds[e])===null||n===void 0?void 0:n[t-this.leftRowSeriesNumberColumnCount];if(this.isColumnHeader(t,e))return(o=this._columnHeaderCellIds[e])===null||o===void 0?void 0:o[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount];if(this.isRowHeader(t,e))return(r=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||r===void 0?void 0:r[t-this.leftRowSeriesNumberColumnCount];if(this.isRightFrozenColumn(t,e))return(s=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||s===void 0?void 0:s[this.rowHeaderLevelCount-1];if(this.isBottomFrozenRow(t,e))return(l=this._columnHeaderCellIds[this.columnHeaderLevelCount-1])===null||l===void 0?void 0:l[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount]}}getHeader(t,e){var n;if(this.isSeriesNumberInHeader(t,e))return this.getSeriesNumberHeader(t,e);const o=this.getCellId(t,e);return(n=this._headerObjectMap[o])!==null&&n!==void 0?n:{id:void 0,field:"",headerType:"text",define:void 0}}getHeaderField(t,e){var n,o;const r=this.getCellId(t,e);return((n=this._headerObjectMap[r])===null||n===void 0?void 0:n.field)||((o=this.getBody(t,e))===null||o===void 0?void 0:o.field)}getHeaderCellAdressById(t){for(let e=0;e<this._columnHeaderCellIds.length;e++){const n=this._columnHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o+this._table.frozenColCount,row:e}}for(let e=0;e<this._rowHeaderCellIds.length;e++){const n=this._rowHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e+this._table.frozenRowCount}}for(let e=0;e<this._cornerHeaderCellIds.length;e++){const n=this._cornerHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e}}}getHeaderCellAddressByField(t){const e=this.headerObjects.find(n=>n&&n.field===t);return e&&this.getHeaderCellAdressById(e.id)}getBody(t,e){var n,o,r,s,l,a,h,d,u,c;const g=this.getBodyWidthCache(t,e);if(g)return g;if(this.isSeriesNumber(t,e)){const v=this.getSeriesNumberBody(t,e);return this.setBodyWidthCache(t,e,v),v}const f=this.getCellHeaderPaths(t,e);if(this.indicatorsAsCol){const v=(o=(n=f.colHeaderPaths)===null||n===void 0?void 0:n.find(S=>S.indicatorKey))===null||o===void 0?void 0:o.indicatorKey,C=z(v)&&(l=(s=(r=this._indicators)===null||r===void 0?void 0:r.find(S=>S.indicatorKey===v))!==null&&s!==void 0?s:this._indicators[0])!==null&&l!==void 0?l:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,C),C}const p=(h=(a=f.rowHeaderPaths)===null||a===void 0?void 0:a.find(v=>v.indicatorKey))===null||h===void 0?void 0:h.indicatorKey,m=z(p)&&(c=(u=(d=this._indicators)===null||d===void 0?void 0:d.find(v=>v.indicatorKey===p))!==null&&u!==void 0?u:this._indicators[0])!==null&&c!==void 0?c:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,m),m}getCellRange(t,e){var n,o;const r={start:{col:t,row:e},end:{col:t,row:e}};if(!this.isHeader(t,e)||t===-1||e===-1||this.isRightFrozenColumn(t,e)||this.isBottomFrozenRow(t,e))return r;if(this._table.isPivotChart()){if(this.isLeftBottomCorner(t,e))return{start:{col:0,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.frozenColCount-1,row:this.rowCount-1}};if(this.isRightTopCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:0},end:{col:this.colCount-1,row:this.frozenRowCount-1}};if(this.isRightBottomCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.colCount-1,row:this.rowCount-1}}}for(let s=0;s<this._largeCellRangeCache.length;s++){const l=this._largeCellRangeCache[s];if(t>=l.start.col&&t<=l.end.col&&e>=l.start.row&&e<=l.end.row)return l}if(this.isHeader(t,e)&&t!==-1&&e!==-1){const s=this.getCellId(t,e);for(let l=t-1;l>=0&&s===this.getCellId(l,e);l--)r.start.col=l;for(let l=t+1;l<((n=this.colCount)!==null&&n!==void 0?n:0)&&s===this.getCellId(l,e);l++)r.end.col=l;for(let l=e-1;l>=0&&s===this.getCellId(t,l);l--)r.start.row=l;for(let l=e+1;l<((o=this.rowCount)!==null&&o!==void 0?o:0)&&!(s!==this.getCellId(t,l)||this.isSeriesNumberInHeader(t,e)&&l>=this.columnHeaderLevelCount);l++)r.end.row=l}return(r.end.col-r.start.col>100||r.end.row-r.start.row>100)&&this._largeCellRangeCache.push(r),r}isCellRangeEqual(t,e,n,o){const r=this.getCellRange(t,e),s=this.getCellRange(n,o);return r.start.col===s.start.col&&r.end.col===s.end.col&&r.start.row===s.start.row&&r.end.row===s.end.row}getBodyIndexByRow(t){return t<this.columnHeaderLevelCount||t>=this.rowCount-this.bottomHeaderRowCount?-1:t-this.columnHeaderLevelCount}get bottomHeaderRowCount(){return this._table.isPivotChart()?this.bottomFrozenRowCount:0}get rightHeaderColCount(){return this._table.isPivotChart()?this.rightFrozenColCount:0}getBodyIndexByCol(t){return t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||t>=this.colCount-this.rightHeaderColCount?-1:t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount}getRecordStartRowByRecordIndex(t){return this.columnHeaderLevelCount+t}getRecordShowIndexByCell(t,e){}getCellHeaderPathsWithTreeNode(t,e){for(let l=0;l<this._largeCellRangeCache.length;l++){const a=this._largeCellRangeCache[l];if(t>=a.start.col&&t<=a.end.col&&e>=a.start.row&&e<=a.end.row)break}let n=this.getColHeaderPathCache(t,e),o=this.getRowHeaderPathCache(t,e);const r=this.getBodyIndexByCol(t),s=this.getBodyIndexByRow(e)+this.currentPageStartIndex;if(!n&&e>=0&&r>=0&&(n=this.columnDimensionTree.getTreePath(r,this.showHeader&&this.showColumnHeader?e-(this.columnHeaderTitle?1:0):this.columnDimensionTree.totalLevel),this.setColHeaderPathCache(t,e,n)),!o&&t>=0&&s>=0){if(o=[],this.rowHierarchyType==="tree"){const l=this._rowHeaderCellFullPathIds[s];let a=this.rowDimensionTree,h=0;for(;a;){const d=[];let u=l[h];for(d.push(u);;){const g=this._headerObjectMap[u];if(!(g!=null&&g.parentCellId))break;d.unshift(g.parentCellId),u=g.parentCellId}const c=a.getTreePathByCellIds(d);o.push(...c),a=this._rowHeaderExtensionTree[l[h]],h++}}else o=this.rowDimensionTree.getTreePath(s,this.showHeader&&this.showRowHeader?t-(this.rowHeaderTitle?1:0)-this.leftRowSeriesNumberColumnCount:this.rowDimensionTree.totalLevel);this.setRowHeaderPathCache(t,e,o)}return{colHeaderPaths:n,rowHeaderPaths:o,cellLocation:this.getCellLocation(t,e)}}getCellHeaderPaths(t,e){var n,o;const r=this.getCellHeaderPathsWithTreeNode(t,e),s={colHeaderPaths:[],rowHeaderPaths:[],cellLocation:r.cellLocation};return(n=r.colHeaderPaths)===null||n===void 0||n.forEach(l=>{var a,h,d;const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.colHeaderPaths.push(u)}),(o=r.rowHeaderPaths)===null||o===void 0||o.forEach(l=>{var a,h,d;if(l.dimensionKey!=="axis"){const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.rowHeaderPaths.push(u)}}),s}getIndicatorInfoByIndicatorKey(t){var e;return(e=this.indicatorsDefine)===null||e===void 0?void 0:e.find(n=>typeof n!="string"&&!!t&&n.indicatorKey===t)}findFullCellIds(t){const e=[];for(let n=0;n<t.length;n++){let o=t[n];for(e.push(o);;){const r=this._headerObjectMap[o];if(!(r!=null&&r.parentCellId))break;e.unshift(r.parentCellId),o=r.parentCellId}}return e}getHeaderDimension(t,e){var n,o,r;if(this.isHeader(t,e)){const s=this.getHeader(t,e);return(o=(n=this.rowsDefine)===null||n===void 0?void 0:n.find(l=>typeof l!="string"&&l.dimensionKey===s.field))!==null&&o!==void 0?o:(r=this.columnsDefine)===null||r===void 0?void 0:r.find(l=>typeof l!="string"&&l.dimensionKey===s.field)}}isColumnIndicatorHeader(t,e){return this._indicatorShowType==="column"&&e===this.columnHeaderLevelCount-1&&t>=this.rowHeaderLevelCount}isRowIndicatorHeader(t,e){return this._indicatorShowType==="row"&&t===this.rowHeaderLevelCount-1&&e>=this.columnHeaderLevelCount}isIndicatorHeader(t,e){return this.isColumnIndicatorHeader(t,e)||this.isRowIndicatorHeader(t,e)}toggleHierarchyState(t,e){var n,o,r,s,l,a;this.colIndex=0;const h=this._rowHeaderCellFullPathIds_FULL.slice(0),d=h.map((g,f)=>({col:t,row:f+this.columnHeaderLevelCount})),u=this.getHeader(t,e);if(u.define.hierarchyState=u.define.hierarchyState===Ot.collapse?Ot.expand:Ot.collapse,this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._rowHeaderCellFullPathIds_FULL=[],this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=[],this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs),this.rowHeaderTitle){const g=++this.sharedVar.seqId,f=Array(this.rowCount-this.columnHeaderLevelCount).fill(g);this._rowHeaderCellFullPathIds_FULL.unshift(f);const p={id:g,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((m,v)=>typeof v=="string"?m:m+(m?`/${v.title}`:`${v.title}`),""),field:void 0,headerType:(o=(n=this.rowHeaderTitle)===null||n===void 0?void 0:n.headerType)!==null&&o!==void 0?o:"text",style:(r=this.rowHeaderTitle)===null||r===void 0?void 0:r.headerStyle,define:{field:"",headerType:"text",cellType:"text",disableHeaderHover:!!(!((s=this.rowHeaderTitle)===null||s===void 0)&&s.disableHeaderHover),disableHeaderSelect:!!(!((l=this.rowHeaderTitle)===null||l===void 0)&&l.disableHeaderSelect)}};this.rowHeaderObjs.push(p),this._headerObjects[g]=p}this._rowHeaderCellFullPathIds_FULL=$0(this._rowHeaderCellFullPathIds_FULL),this.rowHierarchyType==="tree"&&((a=this.extensionRows)===null||a===void 0?void 0:a.length)>=1&&this.generateExtensionRowTree(),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((g,f)=>(g[f.id]=f,g),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0;const c=c9(t,e,h.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),this._rowHeaderCellFullPathIds_FULL.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),d,this);return this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination),c}isHeaderForColWidth(t,e){return this.isHeader(t,e)}getHeaderForColWidth(t,e){return this.getHeader(t,e)}getPivotCellAdress(t){var e;if(!Array.isArray(t))return;let n,o,r=this.rowTree,s=this.columnTree;for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1){if(((e=this==null?void 0:this.cornerSetting)===null||e===void 0?void 0:e.titleOnDimension)==="row"){let g=0;return this.rowHierarchyType==="grid"&&(g=this.rowDimensionKeys.indexOf(d.dimensionKey)),g===-1?void 0:{col:(this.rowHeaderTitle?g+1:g)+this.leftRowSeriesNumberColumnCount,row:0}}const c=this.colDimensionKeys.indexOf(d.dimensionKey);return c===-1?void 0:{col:0+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderTitle?c+1:c}}let u=!1;for(let c=0;c<s.length;c++){const g=s[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){s=g.children,o=g,u=!0;break}}if(!u)for(let c=0;c<r.length;c++){const g=r[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){r=g.children,n=g;break}}}let l=0,a=0;if(n){a=this.columnHeaderLevelCount;const{startInTotal:h,level:d}=n;return a+=h,l=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?d+1:d)+this.leftRowSeriesNumberColumnCount:0+this.leftRowSeriesNumberColumnCount,{col:l,row:a}}if(o){l=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:h,level:d}=o;return l+=h,a=this.columnHeaderTitle?d+1:d,{col:l,row:a}}}getPivotDimensionInfo(t,e){var n;const{colHeaderPaths:o,rowHeaderPaths:r}=this.getCellHeaderPaths(t,e),s=[];return o.length?o.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):r.length?r.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):this.isCornerHeader(t,e)&&(((n=this==null?void 0:this.cornerSetting)===null||n===void 0?void 0:n.titleOnDimension)==="row"?s.push({dimensionKey:this.rowDimensionKeys[(this.rowHeaderTitle?t-1:t)-this.leftRowSeriesNumberColumnCount],isPivotCorner:!0}):s.push({dimensionKey:this.colDimensionKeys[this.columnHeaderTitle?e-1:e],isPivotCorner:!0})),s}getIndicatorKey(t,e){var n;return(n=this.getBody(t,e))===null||n===void 0?void 0:n.indicatorKey}getParentCellId(t,e){if(e!==0)return this.isColumnHeader(t,e)?this.getCellId(t,e-1):this.isRowHeader(t,e)?this.getCellId(t-1,e):void 0}getRowHeaderCellAddressByCellId(t){let e,n;if(this._rowHeaderCellIds.find((o,r)=>!!o.find((s,l)=>s===t&&(e=l,!0))&&(n=r,!0)),z(e)&&z(n))return{col:e,row:n+this.columnHeaderLevelCount}}canMoveHeaderPosition(t,e){if(this.isSeriesNumberInHeader(e.col,e.row)||this.isSeriesNumberInHeader(t.col,t.row)||this.isCornerHeader(e.col,e.row)||t.col<0||t.row<0||e.col<0||e.row<0)return!1;this.isSeriesNumberInBody(e.col,e.row)&&this.isSeriesNumberInBody(t.col,t.row)&&(t.col=t.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1,e.col=e.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1);const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row))return this.getParentCellId(t.col,n.start.row)===this.getParentCellId(e.col,n.start.row);if(this.isRowHeader(t.col,t.row)){if(this.rowHierarchyType!=="tree")return this.getParentCellId(n.start.col,t.row)===this.getParentCellId(n.start.col,e.row);{const o=Pe(this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths),r=Pe(this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths);if(o.pop(),r.pop(),o.length<=r.length){if(o.length===r.length)return!o.find((s,l)=>s.dimensionKey!==r[l].dimensionKey||s.value!==r[l].value);if(o.length>0){for(let s=0;s<o.length;s++)if(o[s].startInTotal!==r[s].startInTotal)return!1}return!0}}}return!1}moveHeaderPosition(t,e){if(this.canMoveHeaderPosition(t,e)&&!this.isCellRangeEqual(t.col,t.row,e.col,e.row)){const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row)){const o=n.end.col-n.start.col+1;let r;const s=this.getCellRange(e.col,n.start.row);if(r=e.col>=t.col?s.end.col-o+1:s.start.col,r===n.start.col)return null;for(let a=0;a<this._columnHeaderCellFullPathIds.length;a++){const h=this._columnHeaderCellFullPathIds[a].splice(n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,o);h.unshift(r-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnHeaderCellFullPathIds[a],h)}const l=this._columnWidths.splice(n.start.col-this.leftRowSeriesNumberColumnCount,o);return l.unshift(r-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnWidths,l),this.columnDimensionTree.movePosition(this.getCellHeaderPathsWithTreeNode(t.col,t.row).colHeaderPaths.length-1,n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,s.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount),this.columnDimensionTree.reset(this.columnDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.col,targetIndex:r,sourceSize:o,targetSize:s.end.col-s.start.col+1,moveType:"column"}}if(this.isRowHeader(t.col,t.row)){let o;const r=this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths,s=this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths,l=r[r.length-1],a=s[r.length-1],h=l.size;if(o=e.row>=t.row?a.startInTotal+a.size-h:a.startInTotal,o===n.start.row-this.columnHeaderLevelCount)return null;const d=this._rowHeaderCellIds.splice(n.start.row-this.columnHeaderLevelCount,h);d.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellIds,d);const u=this._rowHeaderCellFullPathIds.splice(n.start.row-this.columnHeaderLevelCount,h);u.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds,u);const c=this._rowHeaderCellIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);c.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellIds_FULL,c);const g=this._rowHeaderCellFullPathIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);return g.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL,g),this.rowDimensionTree.movePosition(r.length-1,n.start.row-this.columnHeaderLevelCount,o+(e.row>t.row?l.size-1:0)),this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.row,targetIndex:o+this.columnHeaderLevelCount,sourceSize:h,targetSize:a.size,moveType:"row"}}}return null}getCellAdressByHeaderPath(t){var e,n,o,r,s,l;let a,h,d=!1,u=!1;if(Array.isArray(t)){if(t.length>this.rowDimensionKeys.length+this.colDimensionKeys.length)return;a=t.filter(y=>this.colDimensionKeys.indexOf(y.dimensionKey)>=0||this.colDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey),h=t.filter(y=>this.rowDimensionKeys.indexOf(y.dimensionKey)>=0||this.rowDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey)}else a=t.colHeaderPaths,h=t.rowHeaderPaths,(t==null?void 0:t.cellLocation)==="body"&&this._table.isPivotTable()&&(u=!0);if(!Array.isArray(a)&&!Array.isArray(h))return;if(a==null||a.sort((y,w)=>{var A,R;return this.colDimensionKeys.indexOf((A=y.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)-this.colDimensionKeys.indexOf((R=w.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)}),h==null||h.sort((y,w)=>{var A,R;return this.fullRowDimensionKeys.indexOf((A=y.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)-this.fullRowDimensionKeys.indexOf((R=w.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)}),a==null||a.forEach(y=>{y.isPivotCorner&&(d=!0)}),h==null||h.forEach(y=>{y.isPivotCorner&&(d=!0)}),d){if(this.cornerSetting.titleOnDimension==="all"&&this.indicatorsAsCol&&a.length===0){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((e=h[0])===null||e===void 0?void 0:e.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderLevelCount-1}}else if(this.cornerSetting.titleOnDimension!=="all"||this.indicatorsAsCol||h.length!==0){if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="all"&&!this.indicatorsAsCol){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((o=h[0])===null||o===void 0?void 0:o.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:0}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((r=a[0])===null||r===void 0?void 0:r.dimensionKey)===this.colDimensionKeys[y])return{col:0,row:y}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((n=a[0])===null||n===void 0?void 0:n.dimensionKey)===this.colDimensionKeys[y])return{col:this.rowHeaderLevelCount-1,row:y}}let c,g,f,p,m=!1;(a==null?void 0:a.length)>=1&&(h==null?void 0:h.length)>=1&&(m=!0);let v,C,S=this.rowTree,_=this.columnTree;if(a)for(let y=0;y<a.length;y++){const w=a[y];for(let A=0;A<_.length;A++){const R=_[A];if(!z(w.indicatorKey)&&R.dimensionKey===w.dimensionKey&&R.value===w.value||z(w.indicatorKey)&&R.indicatorKey===w.indicatorKey){_=R.children,m&&!_?C=R:m||(C=R);break}}}if((h==null?void 0:h.length)>=1)if(this.rowHierarchyType==="tree"){const y=h[h.length-1],w=this.headerObjects.filter(R=>((R==null?void 0:R.field)===y.dimensionKey||(R==null?void 0:R.field)===y.indicatorKey)&&(R==null?void 0:R.title)===y.value).map(R=>R.id),A=this._rowHeaderCellIds.filter(R=>w.indexOf(R[R.length-1])>=0).find(R=>{const x=this.findFullCellIds(R);return x.length===h.length&&x.every(M=>{const T=this._headerObjectMap[M];return h.find(B=>B.dimensionKey===T.field&&B.value===T.title)})});g=this._rowHeaderCellIds.indexOf(A)+this.columnHeaderLevelCount}else for(let y=0;y<h.length;y++){const w=h[y];for(let A=0;A<S.length;A++){const R=S[A];if(!z(w.indicatorKey)&&R.dimensionKey===w.dimensionKey&&R.value===w.value||z(w.indicatorKey)&&R.indicatorKey===w.indicatorKey&&(!z(w.value)||R.value===w.value)){S=R.children,(!m||S&&!S.some(x=>x.dimensionKey==="axis"))&&m||(v=R);break}}}if(u||!m||(v||z(g))&&C){if(v||u){g=this.columnHeaderLevelCount;const{startInTotal:y,level:w}=(s=v)!==null&&s!==void 0?s:oT;g+=y??0,f=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?w+1:w)+this.leftRowSeriesNumberColumnCount:0}if(C||u){c=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:y,level:w}=(l=C)!==null&&l!==void 0?l:oT;c+=y??0,p=this.columnHeaderTitle?w+1:w}return z(c)||z(g)?{col:c??f,row:g??p}:void 0}}setChartInstance(t,e,n){var o,r,s,l;const a=this.getCellHeaderPaths(t,e);let h;if(this.indicatorsAsCol){const d=(o=a.colHeaderPaths.find(u=>u.indicatorKey))===null||o===void 0?void 0:o.indicatorKey;h=(r=this._indicators)===null||r===void 0?void 0:r.find(u=>u.indicatorKey===d)}else{const d=(s=a.rowHeaderPaths.find(u=>u.indicatorKey))===null||s===void 0?void 0:s.indicatorKey;h=(l=this._indicators)===null||l===void 0?void 0:l.find(u=>u.indicatorKey===d)}typeof(h==null?void 0:h.chartSpec)!="function"&&h&&(h.chartInstance=n)}getChartInstance(t,e){var n,o,r,s;const l=this.getCellHeaderPaths(t,e);let a;if(this.indicatorsAsCol){const h=(n=l.colHeaderPaths.find(d=>d.indicatorKey))===null||n===void 0?void 0:n.indicatorKey;a=(o=this._indicators)===null||o===void 0?void 0:o.find(d=>d.indicatorKey===h)}else{const h=(r=l.rowHeaderPaths.find(d=>d.indicatorKey))===null||r===void 0?void 0:r.indicatorKey;a=(s=this._indicators)===null||s===void 0?void 0:s.find(d=>d.indicatorKey===h)}return a==null?void 0:a.chartInstance}checkHasChart(){return $A(this)}getDimension(t,e){var n,o;return e==="column"?(n=this.columnsDefine)===null||n===void 0?void 0:n.find(r=>typeof r!="string"&&r.dimensionKey===t):e==="row"?(o=this.rowsDefine)===null||o===void 0?void 0:o.find(r=>typeof r!="string"&&r.dimensionKey===t):void 0}getAxisConfigInPivotChart(t,e){if((this.isFrozenColumn(t,e)||this.isRightFrozenColumn(t,e))&&_l(t,e,"row",this)||(this.isFrozenRow(t,e)||this.isBottomFrozenRow(t,e))&&_l(t,e,"col",this))return Bt.getFunction("getAxisConfigInPivotChart")(t,e,this)}isEmpty(t,e){return!!this._table.isPivotChart()&&(!!this.isLeftBottomCorner(t,e)||!!this.isRightBottomCorner(t,e)||!!this.isRightTopCorner(t,e))}isAxisCell(t,e){return this._table.isPivotChart()?!!(this.indicatorKeys.length>=1&&_h(this.indicatorsDefine)&&(this.isBottomFrozenRow(t,e)&&_l(t,e,"col",this)||this.isRightFrozenColumn(t,e)&&_l(t,e,"row",this)||this.isRowHeader(t,e)&&t===this.rowHeaderLevelCount-1&&_l(t,e,"row",this)||this.hasTwoIndicatorAxes&&this.indicatorsAsCol&&e===this.columnHeaderLevelCount-1&&_l(t,e,"col",this))):!1}getChartAxes(t,e){if($8(t,e,this)||this.isAxisCell(t,e))return U8(t,e,this)}getRawChartSpec(t,e){return N8(t,e,this)}getChartSpec(t,e){return G8(t,e,this)}isShareChartSpec(t,e){return V8(t,e,this)}getChartDataId(t,e){return jA(t,e,this)}isNoChartDataRenderNothing(t,e){return j8(t,e,this)}setPagination(t){var e,n,o,r,s,l,a;if(this.clearCellRangeMap(),this._table.internalProps.useOneRowHeightFillAll=!1,this.pagination=t,this.rowHierarchyType==="grid"&&z((e=this.pagination)===null||e===void 0?void 0:e.perPageCount)&&z((n=this.pagination)===null||n===void 0?void 0:n.currentPage)){this.indicatorsAsCol===!1&&(this.pagination.perPageCount=Math.ceil(this.pagination.perPageCount/this.indicatorKeys.length)*this.indicatorKeys.length);const{perPageCount:h,currentPage:d}=this.pagination;this.currentPageStartIndex=h*(d||0),this.currentPageEndIndex=this.currentPageStartIndex+h,this._rowHeaderCellIds=(o=this._rowHeaderCellIds_FULL)===null||o===void 0?void 0:o.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(r=this._rowHeaderCellFullPathIds_FULL)===null||r===void 0?void 0:r.slice(this.currentPageStartIndex,this.currentPageEndIndex)}else this.currentPageStartIndex=0,this.currentPageEndIndex=this._rowHeaderCellIds_FULL.length,this._rowHeaderCellIds=(s=this._rowHeaderCellIds_FULL)===null||s===void 0?void 0:s.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(l=this._rowHeaderCellFullPathIds_FULL)===null||l===void 0?void 0:l.slice(this.currentPageStartIndex,this.currentPageEndIndex);this.pagination&&(this.pagination.totalCount=(a=this._rowHeaderCellIds_FULL)===null||a===void 0?void 0:a.length)}release(){var t;const e=this._table._getActiveChartInstance();e==null||e.release(),(t=this._indicators)===null||t===void 0||t.forEach(n=>{var o;(o=n.chartInstance)===null||o===void 0||o.release()})}getHeadNode(t,e){var n,o,r;let s;const l=this.getCellHeaderPaths(t,e);return l.rowHeaderPaths&&((o=(n=l.rowHeaderPaths)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0?s=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.slice(0,l.rowHeaderPaths.length):l.colHeaderPaths&&l.colHeaderPaths.length>0&&(s=l.colHeaderPaths.slice(0,l.colHeaderPaths.length)),this.getHeadNodeByRowOrColDimensions(s,t,e)}getHeadNodeByRowOrColDimensions(t,e,n){var o;if(!Array.isArray(t))return;let r,s,l=this.rowTree,a=this.columnTree;if(z(n)&&z(e)&&this.rowHierarchyType==="tree"&&this.extensionRows&&e>=1+this.leftRowSeriesNumberColumnCount){const h=this.getCellId(e-1,n);l=this._rowHeaderExtensionTree[h].tree.children}for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1)return;let u=!1;for(let c=0;c<a.length;c++){const g=a[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){a=g.children,s=g,u=!0;break}}if(!u)for(let c=0;(o=c<(l==null?void 0:l.length))!==null&&o!==void 0&&o;c++){const g=l[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){l=g.children,r=g;break}}}return r||s||void 0}clearCellRangeMap(){this._largeCellRangeCache.length=0,this._CellHeaderPathMap=new Map}getDimensionKeyInChartSpec(t,e){var n,o,r,s,l,a;let h;if(this.indicatorsAsCol===!1)for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(n=u.xField)!==null&&n!==void 0?n:(r=(o=u==null?void 0:u.series)===null||o===void 0?void 0:o[0])===null||r===void 0?void 0:r.xField,h))return h}else for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(s=u.yField)!==null&&s!==void 0?s:(a=(l=u==null?void 0:u.series)===null||l===void 0?void 0:l[0])===null||a===void 0?void 0:a.yField,h))return h}return null}_generateChartState(){return{vtable_selected:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}},vtable_selected_reverse:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}}}}updateDataStateToChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();this._indicators.forEach(o=>{var r;const s=o.chartInstance;((r=o.chartSpec.select)===null||r===void 0?void 0:r.enable)!==!1&&s.updateState(n)}),t==null||t.updateState(n)}}updateDataStateToActiveChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();t==null||t.updateState(n)}}getIndicatorKeyInChartSpec(t,e){const n=this.getRawChartSpec(t,e),o=[];if(n){if(n.series||n.xField||n.yField)return this.indicatorsAsCol===!1?n.series?n.series.forEach(r=>{const s=r.yField;o.push(s)}):o.push(n.yField):n.series?n.series.forEach(r=>{const s=r.xField;o.push(s)}):o.push(n.xField),o;if(n.valueField&&o.push(n.valueField),o.length>=1)return o}return null}getOptimunHeightForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(this.rowHeaderLevelCount,t).rowHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="yField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=rT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=Yt((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[0]+d[2]}getOptimunWidthForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(t,this.columnHeaderLevelCount).colHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="xField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=rT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=Yt((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[1]+d[3]}get leftAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="left");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}get topAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="top");return(t==null?void 0:t.visible)===!1?0:this.indicatorsAsCol&&this.hasTwoIndicatorAxes?1:0}get rightAxesCount(){return this.rightFrozenColCount}get bottomAxesCount(){return this.bottomFrozenRowCount}getColKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.colHeaderPaths.length&&n.colHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getRowKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.rowHeaderPaths.length&&n.rowHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getIndicatorInfo(t,e=""){var n;return(n=this.indicatorsDefine)===null||n===void 0?void 0:n.find(o=>typeof o!="string"&&(t?o.indicatorKey===t:!!e&&o.title===e))}getLayoutColumnTree(){const t=[],e=this.columnDimensionTree.tree.children;return Um(t,e),t}getLayoutRowTree(){const t=[],e=this.rowDimensionTree.tree.children;return Um(t,e),t}getLayoutColumnTreeCount(){const t=this.columnDimensionTree.tree.children;return lg(t,this.rowHierarchyType==="tree")}getLayoutRowTreeCount(){var t;const e=this.rowDimensionTree.tree.children;let n=lg(e,this.rowHierarchyType==="tree");return(t=this.extensionRows)===null||t===void 0||t.forEach(o=>{if(typeof o.rowTree!="function"){const r=lg(o.rowTree,!0);n*=r}}),n}resetHeaderTree(){var t,e,n;this.colIndex=0,this._rowHeaderCellFullPathIds_FULL=[],this._columnHeaderCellFullPathIds=[],this._columnHeaderCellIds=[];const o=this.dataset;this.rowTree=o.rowHeaderTree,this.columnTree=o.colHeaderTree;const r=this.rowDimensionTree.tree.children;(t=this.rowTree)===null||t===void 0||t.forEach((s,l)=>{const a=r.find(h=>h.dimensionKey===s.dimensionKey&&h.value===s.value);a&&this._table._syncHierarchyState(a,s)}),this.columnDimensionTree=new Me((e=this.columnTree)!==null&&e!==void 0?e:[],this.sharedVar),this.rowDimensionTree=new Me((n=this.rowTree)!==null&&n!==void 0?n:[],this.sharedVar,this.rowHierarchyType,this.rowHierarchyType==="tree"?this.rowExpandLevel:void 0),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=$0(this._rowHeaderCellFullPathIds_FULL),this._headerObjectMap=this._headerObjects.reduce((s,l)=>(s[l.id]=l,s),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination)}isSeriesNumberInHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount}isSeriesNumberInBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount}isSeriesNumber(t,e){return!!(z(t)&&z(e)&&(this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount))}getSeriesNumberHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount?Object.assign({},this.leftRowSeriesNumberColumn[t],{style:this._table.internalProps.rowSeriesNumber.headerStyle}):this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount&&e<this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}getSeriesNumberBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.leftRowSeriesNumberColumn[t]:this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}changeTreeNodeTitle(t,e,n){this.getHeadNode(t,e).value=n;const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}changeCornerTitle(t,e,n){if(this.isCornerHeader(t,e)){const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}}generateCellIdsConsiderHideHeader(){if(this._columnHeaderCellIds=this._columnHeaderCellFullPathIds.slice(),!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(ji),e=this._columnHeaderCellIds.splice(t,1);this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length),this._columnHeaderCellIds.push(e[0])}else this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length);if(this._rowHeaderCellIds_FULL=this._rowHeaderCellFullPathIds_FULL.slice(),!this.showRowHeader)if(this.indicatorsAsCol||this.hideIndicatorName)this._rowHeaderCellIds_FULL.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._rowHeaderCellIds_FULL[e]=n});else{const t=this.rowDimensionKeys.indexOf(ji);this._rowHeaderCellIds_FULL.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._rowHeaderCellIds_FULL[n]=o})}if(this._rowHeaderCellIds=this._rowHeaderCellIds_FULL.slice(),this._cornerHeaderCellIds=this._cornerHeaderCellFullPathIds.slice(),this.rowHeaderLevelCount===0||this.columnHeaderLevelCount===0)this._cornerHeaderCellIds=[];else if(this.cornerSetting.titleOnDimension!=="row"||this.showRowHeader){if(this.cornerSetting.titleOnDimension==="column"&&!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(ji),e=this._cornerHeaderCellIds.splice(t,1);this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length),this._cornerHeaderCellIds.push(e[0])}else this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length)}else if(this.indicatorsAsCol||this.hideIndicatorName)this._cornerHeaderCellIds.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._cornerHeaderCellIds[e]=n});else{const t=this.rowDimensionKeys.indexOf(ji);this._cornerHeaderCellIds.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._cornerHeaderCellIds[n]=o})}}enableUseGetBodyCache(){this._useGetBodyCache=!0,this._getBodyCache.clear()}disableUseGetBodyCache(){this._useGetBodyCache=!1,this._getBodyCache.clear()}enableUseHeaderPathCache(){this._useHeaderPathCache=!0,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}disableUseHeaderPathCache(){this._useHeaderPathCache=!1,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}getBodyWidthCache(t,e){if(this._useGetBodyCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e))return this.indicatorsAsCol&&this._getBodyCache.has(t)?this._getBodyCache.get(t):!this.indicatorsAsCol&&this._getBodyCache.has(e)?this._getBodyCache.get(e):void 0}setBodyWidthCache(t,e,n){!this._useGetBodyCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||(this.indicatorsAsCol?this._getBodyCache.set(t,n):this._getBodyCache.set(e,n))}getColHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._colHeaderPathCache.has(t))return this._colHeaderPathCache.get(t)}setColHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._colHeaderPathCache.set(t,n)}getRowHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._rowHeaderPathCache.has(e))return this._rowHeaderPathCache.get(e)}setRowHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._rowHeaderPathCache.set(e,n)}}function rT(i,t,e,n){e===1&&(e=0);const o=g9(i,e,n),r=t/(1-e);return Math.ceil(o*r)}function g9(i,t,e){let n;return n=i===1?i+2*e:i-t+2*e,i?n>0?n:1:0}class nv{constructor(t,e){this.tree={},this.beforeChangedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.dataConfig=t,e&&(this.records=e,typeof window<"u"&&window.performance.now(),this.setRecords(e),typeof window<"u"&&window.performance.now())}changeDataConfig(t){this.dataConfig=t}setRecords(t){this.processRecords()}processRecords(){for(let t=0,e=this.records.length;t<e;t++){const n=this.records[t];this.processRecord(n)}}processRecord(t){var e;const n=[],o=[];for(let r=0,s=this.dataConfig.rows.length;r<s;r++){const l=this.dataConfig.rows[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&o.push(t[l])}for(let r=0,s=this.dataConfig.columns.length;r<s;r++){const l=this.dataConfig.columns[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&n.push(t[l])}(e=this.dataConfig.indicators)===null||e===void 0||e.forEach(r=>{const s=t[r];s!==void 0&&(this.dataConfig.indicatorsAsCol?n.push(r):o.push(r));const l=o.join(this.stringJoinChar),a=n.join(this.stringJoinChar);o.length!==0&&(this.rowFlatKeys[l]||(this.rowFlatKeys[l]=1)),n.length!==0&&(this.colFlatKeys[a]||(this.colFlatKeys[a]=1)),n.length===0&&o.length===0||(this.tree[l]||(this.tree[l]={}),s!==void 0&&(this.tree[l][a]={value:s,record:t},this.dataConfig.indicatorsAsCol?n.pop():o.pop()))})}getTreeNode(t=[],e=[],n,o=!0){var r,s,l,a;let h,d;if(typeof t=="string")h=t;else{let u=!1;t.map((c,g)=>{c===n&&(t.splice(g,1),u=!0)}),u&&t.push(n),h=t.join(this.stringJoinChar)}if(typeof e=="string")d=e;else{let u=!1;e.map((c,g)=>{c===n&&(e.splice(g,1),u=!0)}),u&&e.push(n),d=e.join(this.stringJoinChar)}return o?(l=(s=(r=this.tree)===null||r===void 0?void 0:r[h])===null||s===void 0?void 0:s[d])!==null&&l!==void 0?l:void 0:z((a=this.beforeChangedTree[h])===null||a===void 0?void 0:a[d])?{value:this.beforeChangedTree[h][d].value,record:this.beforeChangedTree[h][d].record}:void 0}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l,a,h,d,u;let c,g;if(typeof t=="string")c=t;else{let m=!1;t.map((v,C)=>{v===n&&(t.splice(C,1),m=!0)}),m&&t.push(n),c=t.join(this.stringJoinChar)}if(typeof e=="string")g=e;else{let m=!1;e.map((v,C)=>{v===n&&(e.splice(C,1),m=!0)}),m&&e.push(n),g=e.join(this.stringJoinChar)}const f=(s=(r=this.tree[c])===null||r===void 0?void 0:r[g])===null||s===void 0?void 0:s.value,p=Object.assign({},(a=(l=this.tree[c])===null||l===void 0?void 0:l[g])===null||a===void 0?void 0:a.record);!((d=(h=this.tree[c])===null||h===void 0?void 0:h[g])===null||d===void 0)&&d.record?(this.tree[c][g].record[n]=o,this.tree[c][g].value=o):(this.tree[c]||(this.tree[c]={}),this.tree[c][g]={record:this._buildRecord(t,e,n,o),value:o}),!((u=this.beforeChangedTree[c])===null||u===void 0)&&u[g]||(this.beforeChangedTree[c]={},this.beforeChangedTree[c][g]={record:void 0,value:void 0},this.beforeChangedTree[c][g].record=p,this.beforeChangedTree[c][g].value=f)}_buildRecord(t=[],e=[],n,o){const r={},s=this.dataConfig.rows,l=this.dataConfig.columns;return s.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=t[h])}),l.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=e[h])}),r[n]=o,this.records.push(r),r}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}this.records.push(t)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.dataConfig.indicators.length;r++)this.dataConfig.indicators[r]===t&&(o=!0);if(!o){for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}}function sT(i,t){let e="";for(let n=0;n<i.length;n++)e+=i[n],n!==i.length-1&&(e+=t);return e}class xh{constructor(t,e,n,o,r,s,l,a,h,d,u,c,g){var f,p,m,v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q,ot;this.tree={},this.changedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.colKeys_normal=[],this.rowKeys_normal=[],this.rowOrder="key_a_to_z",this.colOrder="key_a_to_z",this.sorted=!1,this.indicatorStatistics=[],this.aggregators={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.registerAggregators(),this.dataConfig=t,this.filterRules=(f=this.dataConfig)===null||f===void 0?void 0:f.filterRules,this.rowHierarchyType=a??"grid",this.sortRules=(p=this.dataConfig)===null||p===void 0?void 0:p.sortRules,this.aggregationRules=(m=this.dataConfig)===null||m===void 0?void 0:m.aggregationRules,this.derivedFieldRules=(v=this.dataConfig)===null||v===void 0?void 0:v.derivedFieldRules,this.mappingRules=(C=this.dataConfig)===null||C===void 0?void 0:C.mappingRules,this.calculatedFieldRules=(S=this.dataConfig)===null||S===void 0?void 0:S.calculatedFieldRules,this.calculatedFiledKeys=(y=(_=this.calculatedFieldRules)===null||_===void 0?void 0:_.map(ct=>ct.key))!==null&&y!==void 0?y:[],this.calculatedFieldDependIndicatorKeys=(A=(w=this.calculatedFieldRules)===null||w===void 0?void 0:w.reduce((ct,_t)=>{for(let yt=0;yt<_t.dependIndicatorKeys.length;yt++)ct.indexOf(_t.dependIndicatorKeys[yt])===-1&&ct.push(_t.dependIndicatorKeys[yt]);return ct},[]))!==null&&A!==void 0?A:[],this.totals=(R=this.dataConfig)===null||R===void 0?void 0:R.totals,this.rows=e,this.columns=n,this.indicatorKeys=o,this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys=[...o];for(let ct=0;ct<this.calculatedFieldDependIndicatorKeys.length;ct++)this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.indexOf(this.calculatedFieldDependIndicatorKeys[ct])===-1&&this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.push(this.calculatedFieldDependIndicatorKeys[ct]);if(this.indicatorsAsCol=s,this.indicators=r,this.customColTree=h,this.customRowTree=d,this.hasExtensionRowTree=c,this.parseCustomTreeToMatchRecords=g,this.parseCustomTreeToMatchRecords&&(this.customColTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customColTree,"col"),this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))),this.colGrandTotalLabel=(T=(M=(x=this.totals)===null||x===void 0?void 0:x.column)===null||M===void 0?void 0:M.grandTotalLabel)!==null&&T!==void 0?T:"总计",this.colSubTotalLabel=(k=(H=(B=this.totals)===null||B===void 0?void 0:B.column)===null||H===void 0?void 0:H.subTotalLabel)!==null&&k!==void 0?k:"小计",this.rowGrandTotalLabel=(F=(E=(P=this.totals)===null||P===void 0?void 0:P.row)===null||E===void 0?void 0:E.grandTotalLabel)!==null&&F!==void 0?F:"总计",this.rowSubTotalLabel=(D=(L=(I=this.totals)===null||I===void 0?void 0:I.row)===null||L===void 0?void 0:L.subTotalLabel)!==null&&D!==void 0?D:"小计",this.collectValuesBy=(O=this.dataConfig)===null||O===void 0?void 0:O.collectValuesBy,this.needSplitPositiveAndNegative=u!=null&&u,this.rowsIsTotal=new Array((W=(V=this.rows)===null||V===void 0?void 0:V.length)!==null&&W!==void 0?W:0).fill(!1),this.colsIsTotal=new Array(($=(j=this.columns)===null||j===void 0?void 0:j.length)!==null&&$!==void 0?$:0).fill(!1),((X=this.totals)===null||X===void 0?void 0:X.row)&&this.totals.row.showSubTotals!==!1&&this.totals.row.subTotalsDimensions)for(let ct=0,_t=(dt=(Q=(U=(K=this.totals)===null||K===void 0?void 0:K.row)===null||U===void 0?void 0:U.subTotalsDimensions)===null||Q===void 0?void 0:Q.length)!==null&&dt!==void 0?dt:0;ct<_t;ct++){const yt=this.totals.row.subTotalsDimensions[ct],ht=this.rows.indexOf(yt);this.rowsIsTotal[ht]=!0}if(!((pt=this.totals)===null||pt===void 0)&&pt.column&&this.totals.column.showSubTotals!==!1&&this.totals.column.subTotalsDimensions)for(let ct=0,_t=(ot=(q=(G=(xt=this.totals)===null||xt===void 0?void 0:xt.column)===null||G===void 0?void 0:G.subTotalsDimensions)===null||q===void 0?void 0:q.length)!==null&&ot!==void 0?ot:0;ct<_t;ct++){const yt=this.totals.column.subTotalsDimensions[ct],ht=this.columns.indexOf(yt);this.colsIsTotal[ht]=!0}this.setRecords(l)}setRecords(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_;this.records=t,this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.tree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.rowsHasValue=[],this.columnsHasValue=[],t&&(this.records=t,typeof window<"u"&&window.performance.now(),this.processRecords(),this.processCollectedValuesWithSumBy(),this.generateCollectedValuesSortRule(),this.processCollectedValuesWithSortBy(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.totalStatistics(),typeof window<"u"&&window.performance.now(),this.rowKeys_normal=this.rowKeys.slice(),this.colKeys_normal=this.colKeys.slice(),typeof window<"u"&&window.performance.now(),this.sortKeys(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.customRowTree?this.rowHeaderTree=this.customRowTree:this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((y,w)=>this.rowsHasValue[w]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((y,w)=>this.rowsHasValue[w]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u),this.customColTree?this.colHeaderTree=this.customColTree:this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((y,w)=>this.columnsHasValue[w]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(S=(C=(v=this.totals)===null||v===void 0?void 0:v.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&S!==void 0&&S),typeof window<"u"&&window.performance.now(),!((_=this.dataConfig)===null||_===void 0)&&_.isPivotChart&&this.cacheDeminsionCollectedValues())}registerAggregator(t,e){this.aggregators[t]=e}registerAggregators(){this.registerAggregator(It.RECORD,hx),this.registerAggregator(It.SUM,ux),this.registerAggregator(It.COUNT,cx),this.registerAggregator(It.MAX,fx),this.registerAggregator(It.MIN,px),this.registerAggregator(It.AVG,gx),this.registerAggregator(It.NONE,dx),this.registerAggregator(It.RECALCULATE,wW)}processCollectedValuesWithSumBy(){var t,e,n,o,r,s;for(const l in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[l])===null||e===void 0)&&e.sumBy)for(const a in this.collectedValues[l]){let h;((n=this.collectValuesBy[l])===null||n===void 0?void 0:n.extendRange)==="sum"?(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>g+f.value(),0),h+=Math.round(h/20)):(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()>g?f.value():g,Number.MIN_SAFE_INTEGER),((o=this.collectValuesBy[l])===null||o===void 0?void 0:o.extendRange)==="max"?h+=Math.round(h/20):typeof((r=this.collectValuesBy[l])===null||r===void 0?void 0:r.extendRange)=="number"&&(h=Math.max(h,(s=this.collectValuesBy[l])===null||s===void 0?void 0:s.extendRange)));const d=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()<g?f.value():g,Number.MAX_SAFE_INTEGER);let u,c;this.needSplitPositiveAndNegative&&(u=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.positiveValue()>g?f.positiveValue():g,Number.MIN_SAFE_INTEGER),c=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.negativeValue()<g?f.negativeValue():g,Number.MAX_SAFE_INTEGER)),this.collectedValues[l][a]={},this.collectedValues[l][a].max=h,this.collectedValues[l][a].min=d,this.needSplitPositiveAndNegative&&(this.collectedValues[l][a].positiveMax=u,this.collectedValues[l][a].negativeMin=c)}}processCollectedValuesWithSortBy(){var t,e;const n=this;for(const o in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[o])===null||e===void 0)&&e.sortBy)for(const r in this.collectedValues[o])this.collectedValues[o][r]=this.collectedValues[o][r].sort((s,l)=>{var a,h,d,u;return((h=(a=n.collectValuesBy[o].sortBy)===null||a===void 0?void 0:a.indexOf(s))!==null&&h!==void 0?h:-1)-((u=(d=n.collectValuesBy[o].sortBy)===null||d===void 0?void 0:d.indexOf(l))!==null&&u!==void 0?u:-1)})}generateCollectedValuesSortRule(){for(const t in this.collectedValues)if(this.collectValuesBy&&this.collectValuesBy[t]&&!this.collectValuesBy[t].sortBy){let e=[];for(const n in this.collectedValues[t])Array.isArray(this.collectedValues[t][n])&&(e.push(...this.collectedValues[t][n]),e=Array.from(new Set(e)));e.length>0&&(this.collectValuesBy[t].sortBy=e)}}processRecords(){var t,e;let n=!1;if(((e=(t=this.filterRules)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0)>=1&&(n=!0),Array.isArray(this.records)){this.filteredRecords||(this.filteredRecords=[]);for(let o=0,r=this.records.length;o<r;o++){const s=this.records[o];n&&!this.filterRecord(s)||(this.filteredRecords.push(s),this.processRecord(s))}}else{this.filteredRecords||(this.filteredRecords={});for(const o in this.records)for(let r=0,s=this.records[o].length;r<s;r++){const l=this.records[o][r];n&&!this.filterRecord(l)||(this.filteredRecords[o]||(this.filteredRecords[o]=[]),this.filteredRecords[o].push(l),this.processRecord(l,o))}}this.rowFlatKeys={},this.colFlatKeys={}}filterRecord(t){var e,n;let o=!0;if(this.filterRules)for(let r=0;r<this.filterRules.length;r++){const s=this.filterRules[r];if(s.filterKey){const l=t[s.filterKey];if(((e=s.filteredValues)===null||e===void 0?void 0:e.indexOf(l))===-1){o=!1;break}}else if(!(!((n=s.filterFunc)===null||n===void 0)&&n.call(s,t))){o=!1;break}}return o}processRecord(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q,ot,ct,_t,yt,ht,et,mt,st,Ft,Ht,vt,Pt,_e,ge,gt,Le,Fe;(n=this.derivedFieldRules)===null||n===void 0||n.forEach((Rt,Mt)=>{Rt.fieldName&&Rt.derivedFunc&&(t[Rt.fieldName]=Rt.derivedFunc(t))});for(const Rt in this.collectValuesBy)if(z(t[Rt])){this.collectedValues[Rt]||(this.collectedValues[Rt]={});const Mt=this.collectValuesBy[Rt].by.map(Vt=>t[Vt]).join(this.stringJoinChar);if(this.collectedValues[Rt][Mt]||(this.collectValuesBy[Rt].sumBy?this.collectedValues[Rt][Mt]={}:this.collectValuesBy[Rt].range?this.collectedValues[Rt][Mt]={min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER}:this.collectedValues[Rt][Mt]=[]),this.collectValuesBy[Rt].sumBy){const Vt=this.collectValuesBy[Rt].sumBy.map(Xt=>t[Xt]).join(this.stringJoinChar);this.collectedValues[Rt][Mt][Vt]||(this.collectedValues[Rt][Mt][Vt]=new this.aggregators[It.SUM]({key:Rt,dimension:Rt,isRecord:void 0,needSplitPositiveAndNegative:this.needSplitPositiveAndNegative})),this.collectedValues[Rt][Mt][Vt].push(t)}else if(this.collectValuesBy[Rt].range){const Vt=this.collectedValues[Rt][Mt],Xt=Math.max(t[Rt],Vt.max),de=Math.min(t[Rt],Vt.min);isNaN(Xt)||(Vt.max=Xt,Vt.min=de)}else{const Vt=this.collectedValues[Rt][Mt];Vt.indexOf(t[Rt])===-1&&Vt.push(t[Rt])}}let me=!1;const Ve=[],ne=[];if(!this.parseCustomTreeToMatchRecords||!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart||!(!((r=this.customRowTree)===null||r===void 0)&&r.length)||e||this.hasExtensionRowTree){const Rt=[];ne.push({rowKey:Rt,indicatorKey:e});for(let Mt=0,Vt=this.rows.length;Mt<Vt;Mt++){const Xt=this.rows[Mt];if(Xt in t)this.rowsHasValue[Mt]=!0,Rt.push(t[Xt]);else if(Xt!==ji){if(!((a=(l=(s=this.dataConfig)===null||s===void 0?void 0:s.totals)===null||l===void 0?void 0:l.row)===null||a===void 0)&&a.showGrandTotals&&Mt===0&&!this.rows.find(de=>de in t)){Rt.push(this.rowGrandTotalLabel),me=!0;break}if(!((u=(d=(h=this.dataConfig)===null||h===void 0?void 0:h.totals)===null||d===void 0?void 0:d.row)===null||u===void 0)&&u.subTotalsDimensions&&((f=(g=(c=this.dataConfig)===null||c===void 0?void 0:c.totals)===null||g===void 0?void 0:g.row)===null||f===void 0?void 0:f.subTotalsDimensions.indexOf(this.rows[Mt-1]))>=0){this.rowHierarchyType==="grid"&&Rt.push(this.rowSubTotalLabel),me=!0;break}}}}else{const Rt=this.getFieldMatchRowDimensionPaths(t);if(Rt.length>0)for(let Mt=0,Vt=Rt.length;Mt<Vt;Mt++){const Xt=Rt[Mt],de=[];let $t;for(let Lt=0,we=Xt.length;Lt<we;Lt++)z(Xt[Lt].indicatorKey)?$t=Xt[Lt].indicatorKey:de.push(Xt[Lt].value);ne.push({rowKey:de,indicatorKey:$t})}}if(!this.parseCustomTreeToMatchRecords||!((p=this.dataConfig)===null||p===void 0)&&p.isPivotChart||!(!((m=this.customColTree)===null||m===void 0)&&m.length)||e||this.hasExtensionRowTree){const Rt=[];Ve.push({colKey:Rt,indicatorKey:e});for(let Mt=0,Vt=this.columns.length;Mt<Vt;Mt++){const Xt=this.columns[Mt];if(Xt in t)this.columnsHasValue[Mt]=!0,Rt.push(t[Xt]);else if(Xt!==ji){if(!((S=(C=(v=this.dataConfig)===null||v===void 0?void 0:v.totals)===null||C===void 0?void 0:C.column)===null||S===void 0)&&S.showGrandTotals&&Mt===0&&!this.columns.find(de=>de in t)){Rt.push(this.colGrandTotalLabel),me=!0;break}if(!((w=(y=(_=this.dataConfig)===null||_===void 0?void 0:_.totals)===null||y===void 0?void 0:y.column)===null||w===void 0)&&w.subTotalsDimensions&&((x=(R=(A=this.dataConfig)===null||A===void 0?void 0:A.totals)===null||R===void 0?void 0:R.column)===null||x===void 0?void 0:x.subTotalsDimensions.indexOf(this.columns[Mt-1]))>=0){Rt.push(this.colSubTotalLabel),me=!0;break}}}}else{const Rt=this.getFieldMatchColDimensionPaths(t);if(Rt.length>0)for(let Mt=0,Vt=Rt.length;Mt<Vt;Mt++){const Xt=Rt[Mt],de=[];let $t;for(let Lt=0,we=Xt.length;Lt<we;Lt++)z(Xt[Lt].indicatorKey)?$t=Xt[Lt].indicatorKey:de.push(Xt[Lt].value);Ve.push({colKey:de,indicatorKey:$t})}}for(let Rt=0;Rt<ne.length;Rt++){const Mt=ne[Rt].rowKey;let Vt;this.indicatorsAsCol||(Vt=ne[Rt].indicatorKey);for(let Xt=0;Xt<Ve.length;Xt++){const de=Ve[Xt].colKey;this.indicatorsAsCol&&(Vt=Ve[Xt].indicatorKey);const $t=Mt.join(this.stringJoinChar),Lt=de.join(this.stringJoinChar);if(me){this.totalRecordsTree[$t]||(this.totalRecordsTree[$t]={}),this.totalRecordsTree[$t][Lt]||(this.totalRecordsTree[$t][Lt]=[]);const Et=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Ut=0;Ut<Et.length;Ut++)if(this.calculatedFiledKeys.indexOf(Et[Ut])>=0){const Ae=(M=this.calculatedFieldRules)===null||M===void 0?void 0:M.find(ai=>ai.key===Et[Ut]);!((B=(T=this.totalRecordsTree[$t])===null||T===void 0?void 0:T[Lt])===null||B===void 0)&&B[Ut]||(this.totalRecordsTree[$t][Lt][Ut]=new this.aggregators[It.RECALCULATE]({key:Et[Ut],dimension:Et[Ut],isRecord:!0,formatFun:(k=(H=this.indicators)===null||H===void 0?void 0:H.find(ai=>typeof ai!="string"&&ai.indicatorKey===Et[Ut]))===null||k===void 0?void 0:k.format,calculateFun:Ae==null?void 0:Ae.calculateFun,dependAggregators:this.totalRecordsTree[$t][Lt],dependIndicatorKeys:Ae==null?void 0:Ae.dependIndicatorKeys})),Et[Ut]in t&&((E=(P=this.totalRecordsTree[$t])===null||P===void 0?void 0:P[Lt])===null||E===void 0||E[Ut].push(t))}else{const Ae=this.getAggregatorRule(Et[Ut]);!((I=(F=this.totalRecordsTree[$t])===null||F===void 0?void 0:F[Lt])===null||I===void 0)&&I[Ut]||(this.totalRecordsTree[$t][Lt][Ut]=new this.aggregators[(L=Ae==null?void 0:Ae.aggregationType)!==null&&L!==void 0?L:It.SUM]({key:Et[Ut],dimension:(D=Ae==null?void 0:Ae.field)!==null&&D!==void 0?D:Et[Ut],formatFun:(O=Ae==null?void 0:Ae.formatFun)!==null&&O!==void 0?O:(W=(V=this.indicators)===null||V===void 0?void 0:V.find(ai=>typeof ai!="string"&&ai.indicatorKey===Et[Ut]))===null||W===void 0?void 0:W.format})),Et[Ut]in t&&(($=(j=this.totalRecordsTree[$t])===null||j===void 0?void 0:j[Lt])===null||$===void 0||$[Ut].push(t))}return}Mt.length!==0&&(this.rowFlatKeys[$t]||(this.rowKeys.push(Mt),this.rowFlatKeys[$t]=1)),de.length!==0&&(this.colFlatKeys[Lt]||(this.colKeys.push(de),this.colFlatKeys[Lt]=1)),this.tree[$t]||(this.tree[$t]={}),!((X=this.tree[$t])===null||X===void 0)&&X[Lt]||(this.tree[$t][Lt]=[]);const we=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Et=0;Et<we.length;Et++)if(this.calculatedFiledKeys.indexOf(we[Et])>=0){const Ut=(K=this.calculatedFieldRules)===null||K===void 0?void 0:K.find(Ae=>Ae.key===we[Et]);!((Q=(U=this.tree[$t])===null||U===void 0?void 0:U[Lt])===null||Q===void 0)&&Q[Et]||(this.tree[$t][Lt][Et]=new this.aggregators[It.RECALCULATE]({key:we[Et],dimension:we[Et],isRecord:!0,formatFun:(pt=(dt=this.indicators)===null||dt===void 0?void 0:dt.find(Ae=>typeof Ae!="string"&&Ae.indicatorKey===we[Et]))===null||pt===void 0?void 0:pt.format,calculateFun:Ut==null?void 0:Ut.calculateFun,dependAggregators:this.tree[$t][Lt],dependIndicatorKeys:Ut==null?void 0:Ut.dependIndicatorKeys})),(G=(xt=this.tree[$t])===null||xt===void 0?void 0:xt[Lt])===null||G===void 0||G[Et].push(t)}else{const Ut=this.getAggregatorRule(we[Et]);let Ae=!1;Vt?e===Vt?we[Et]===Vt&&(Ae=!0):we[Et]===Vt&&we[Et]in t&&(Ae=!0):Ut!=null&&Ut.field?typeof(Ut==null?void 0:Ut.field)=="string"?(Ut==null?void 0:Ut.field)in t&&(Ae=!0):Ut!=null&&Ut.field.find(ai=>ai in t)&&(Ae=!0):we[Et]in t&&(Ae=!0),!(!((ot=(q=this.tree[$t])===null||q===void 0?void 0:q[Lt])===null||ot===void 0)&&ot[Et])&&Ae&&(this.tree[$t][Lt][Et]=new this.aggregators[(ct=Ut==null?void 0:Ut.aggregationType)!==null&&ct!==void 0?ct:It.SUM]({key:we[Et],dimension:(_t=Ut==null?void 0:Ut.field)!==null&&_t!==void 0?_t:we[Et],formatFun:(yt=Ut==null?void 0:Ut.formatFun)!==null&&yt!==void 0?yt:(et=(ht=this.indicators)===null||ht===void 0?void 0:ht.find(ai=>typeof ai!="string"&&ai.indicatorKey===we[Et]))===null||et===void 0?void 0:et.format})),Ae&&((st=(mt=this.tree[$t])===null||mt===void 0?void 0:mt[Lt])===null||st===void 0||st[Et].push(t))}if(this.mappingRules)for(let Et=0;Et<this.indicatorKeys.length;Et++){if(!this.indicatorStatistics[Et]){const Ut=this.getAggregatorRule(this.indicatorKeys[Et]);this.indicatorStatistics[Et]={max:new this.aggregators[It.MAX]({key:this.indicatorKeys[Et],dimension:this.indicatorKeys[Et]}),min:new this.aggregators[It.MIN]({key:this.indicatorKeys[Et],dimension:this.indicatorKeys[Et]}),total:new this.aggregators[(Ft=Ut==null?void 0:Ut.aggregationType)!==null&&Ft!==void 0?Ft:It.SUM]({key:this.indicatorKeys[Et],dimension:(Ht=Ut==null?void 0:Ut.field)!==null&&Ht!==void 0?Ht:this.indicatorKeys[Et],formatFun:(vt=Ut==null?void 0:Ut.formatFun)!==null&&vt!==void 0?vt:(_e=(Pt=this.indicators)===null||Pt===void 0?void 0:Pt.find(Ae=>typeof Ae!="string"&&Ae.indicatorKey===this.indicatorKeys[Et]))===null||_e===void 0?void 0:_e.format})}}this.indicatorStatistics[Et].max.push((gt=(ge=this.tree[$t])===null||ge===void 0?void 0:ge[Lt])===null||gt===void 0?void 0:gt[Et].value()),this.indicatorStatistics[Et].min.push((Fe=(Le=this.tree[$t])===null||Le===void 0?void 0:Le[Lt])===null||Fe===void 0?void 0:Fe[Et].value()),this.indicatorStatistics[Et].total.push(t)}}}}updateSortRules(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S;this.sorted=!1,this.sortRules=t,this.sortKeys(),this.customRowTree||(this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((_,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((_,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u)),this.customColTree||(this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((_,y)=>this.columnsHasValue[y]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(S=(C=(v=this.totals)===null||v===void 0?void 0:v.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&S!==void 0&&S))}updateFilterRules(t,e=!1){var n,o;if(this.filterRules=t,this.filteredRecords=void 0,e)this.tree={};else for(const r in this.tree)for(const s in this.tree[r])for(let l=0;l<this.tree[r][s].length;l++)(n=this.tree[r][s][l])===null||n===void 0||n.reset();this.collectedValues={},this.processRecords(),this.processCollectedValuesWithSumBy(),this.processCollectedValuesWithSortBy(),this.totalStatistics(),!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart&&this.cacheDeminsionCollectedValues()}getAggregatorRule(t){var e;return(e=this.aggregationRules)===null||e===void 0?void 0:e.find((n,o)=>t===n.indicatorKey)}getAggregator(t=[],e=[],n,o=!0,r){var s,l,a,h;const d=this.indicatorKeys.indexOf(n);let u,c;typeof t=="string"?u=t:(r&&r.position!=="row"||t.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||t.splice(p,1)}),u=sT(t,this.stringJoinChar)),typeof e=="string"?c=e:(r&&r.position!=="col"||e.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||e.splice(p,1)}),c=sT(e,this.stringJoinChar));const g=(l=(s=this.tree[u])===null||s===void 0?void 0:s[c])===null||l===void 0?void 0:l[d];if(o&&z((h=(a=this.changedTree[u])===null||a===void 0?void 0:a[c])===null||h===void 0?void 0:h[d])){const f=this.changedTree[u][c][d];return g?{value:()=>f,formatValue:g.formatValue,formatFun:g.formatFun,records:g.records,className:"",recalculate(){},push(){},deleteRecord(){},updateRecord(){},clearCacheValue(){},reset(){}}:{value:()=>f,className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},formatValue:()=>f,clearCacheValue(){},reset(){}}}return g||{className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},value:()=>null,clearCacheValue(){},reset(){}}}sortKeys(){if(this.colKeys=this.colKeys_normal.slice(),this.rowKeys=this.rowKeys_normal.slice(),!this.sorted){this.sorted=!0,this.rowKeys.sort(this.arrSort(this.rows,!0));const t=this.arrSort(this.columns,!1);this.colKeys.sort(t)}}arrSort(t,e){let n;const o=this,r=function(s){const l=[];for(let a=0,h=t.length;a<h;a++)if(n=t[a],o.sortRules)for(let d=0,u=o.sortRules.length;d<u;d++)o.sortRules[d].sortField===n&&l.push({field:n,fieldIndex:a,sortRule:o.sortRules[d],func:o.getSort(o.sortRules[d],e)});return l}.call(this);return function(s,l){var a,h,d,u;let c,g;for(let f=0;f<r.length;f++){if(g=r[f],(a=g.sortRule)===null||a===void 0?void 0:a.sortByIndicator){let p=s,m=l;g.fieldIndex<t.length-1&&(p=s.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?p.push(o.rowSubTotalLabel):e||p.push(o.colSubTotalLabel),m=l.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?m.push(o.rowSubTotalLabel):e||m.push(o.colSubTotalLabel)),c=g.func(p,m,(h=g.sortRule)===null||h===void 0?void 0:h.sortType)}else c=(d=g.func)===null||d===void 0?void 0:d.call(g,s[g.fieldIndex],l[g.fieldIndex],(u=g.sortRule)===null||u===void 0?void 0:u.sortType);if(c!==0)return c}return 0}}getSort(t,e){const n=this;return t.sortByIndicator?(o,r,s)=>{const l=function(a,h){return n.rowHierarchyType==="grid"&&a.length<n.rows.length&&a[a.length-1]!==n.rowSubTotalLabel&&a[a.length-1]!==n.rowGrandTotalLabel&&a.push(n.rowSubTotalLabel),h.length<n.columns.length&&h[h.length-1]!==n.colSubTotalLabel&&h[h.length-1]!==n.colGrandTotalLabel&&h.push(n.colSubTotalLabel),n.getAggregator(a,h,t.sortByIndicator).value()};return e?lc(l(o,t.query),l(r,t.query),s):lc(l(t.query,o),l(t.query,r),s)}:t.sortBy?xW(t.sortBy):t.sortFunc?t.sortFunc:t.sortType?SW:lc}totalStatistics(){var t,e,n,o,r,s,l,a,h,d,u,c,g,f;const p=this,m=(v,C)=>{var S,_,y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q,ot,ct,_t,yt,ht,et,mt,st,Ft,Ht,vt,Pt,_e,ge,gt,Le,Fe,me;if(!((_=(S=this.totalRecordsTree)===null||S===void 0?void 0:S[v])===null||_===void 0)&&_[C])return this.tree[v]||(this.tree[v]={}),void(this.tree[v][C]=(w=(y=this.totalRecordsTree)===null||y===void 0?void 0:y[v])===null||w===void 0?void 0:w[C]);const Ve=C.split(this.stringJoinChar);if(!((R=(A=p.totals)===null||A===void 0?void 0:A.column)===null||R===void 0)&&R.subTotalsDimensions&&((T=(M=(x=p.totals)===null||x===void 0?void 0:x.column)===null||M===void 0?void 0:M.subTotalsDimensions)===null||T===void 0?void 0:T.length)>0&&p.totals.column.showSubTotals!==!1)for(let ne=0,Rt=(k=(H=(B=p.totals)===null||B===void 0?void 0:B.column)===null||H===void 0?void 0:H.subTotalsDimensions)===null||k===void 0?void 0:k.length;ne<Rt;ne++){const Mt=p.totals.column.subTotalsDimensions[ne],Vt=p.columns.indexOf(Mt);if(Vt>=0){const Xt=Ve.slice(0,Vt+1);Xt.push(p.colSubTotalLabel);const de=Xt.join(this.stringJoinChar);if(!((E=(P=this.totalRecordsTree)===null||P===void 0?void 0:P[v])===null||E===void 0)&&E[de])return void(this.tree[v][de]=(I=(F=this.totalRecordsTree)===null||F===void 0?void 0:F[v])===null||I===void 0?void 0:I[de]);this.tree[v][de]||(this.tree[v][de]=[]);const $t=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Lt=0;Lt<$t.length;Lt++)if(this.calculatedFiledKeys.indexOf($t[Lt])>=0){const we=(L=this.calculatedFieldRules)===null||L===void 0?void 0:L.find(Et=>Et.key===$t[Lt]);!((O=(D=this.tree[v])===null||D===void 0?void 0:D[de])===null||O===void 0)&&O[Lt]||(this.tree[v][de][Lt]=new this.aggregators[It.RECALCULATE]({key:$t[Lt],dimension:$t[Lt],isRecord:!0,formatFun:(W=(V=this.indicators)===null||V===void 0?void 0:V.find(Et=>typeof Et!="string"&&Et.indicatorKey===$t[Lt]))===null||W===void 0?void 0:W.format,calculateFun:we==null?void 0:we.calculateFun,dependAggregators:this.tree[v][de],dependIndicatorKeys:we==null?void 0:we.dependIndicatorKeys})),de!==C&&this.tree[v][de][Lt].push(($=(j=p.tree[v])===null||j===void 0?void 0:j[C])===null||$===void 0?void 0:$[Lt])}else{if(!this.tree[v][de][Lt]){const we=this.getAggregatorRule($t[Lt]);this.tree[v][de][Lt]=new this.aggregators[(X=we==null?void 0:we.aggregationType)!==null&&X!==void 0?X:It.SUM]({key:$t[Lt],dimension:(K=we==null?void 0:we.field)!==null&&K!==void 0?K:$t[Lt],formatFun:(U=we==null?void 0:we.formatFun)!==null&&U!==void 0?U:(dt=(Q=this.indicators)===null||Q===void 0?void 0:Q.find(Et=>typeof Et!="string"&&Et.indicatorKey===$t[Lt]))===null||dt===void 0?void 0:dt.format})}de!==C&&this.tree[v][de][Lt].push((xt=(pt=p.tree[v])===null||pt===void 0?void 0:pt[C])===null||xt===void 0?void 0:xt[Lt])}}}if(!((q=(G=p.totals)===null||G===void 0?void 0:G.column)===null||q===void 0)&&q.showGrandTotals||this.rows.length===0){const ne=p.colGrandTotalLabel;if(!((ct=(ot=this.totalRecordsTree)===null||ot===void 0?void 0:ot[v])===null||ct===void 0)&&ct[ne])return void(this.tree[v][ne]=(yt=(_t=this.totalRecordsTree)===null||_t===void 0?void 0:_t[v])===null||yt===void 0?void 0:yt[ne]);this.tree[v][ne]||(this.tree[v][ne]=[]);const Rt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Mt=0;Mt<Rt.length;Mt++)if(this.calculatedFiledKeys.indexOf(Rt[Mt])>=0){const Vt=(ht=this.calculatedFieldRules)===null||ht===void 0?void 0:ht.find(Xt=>Xt.key===Rt[Mt]);!((mt=(et=this.tree[v])===null||et===void 0?void 0:et[ne])===null||mt===void 0)&&mt[Mt]||(this.tree[v][ne][Mt]=new this.aggregators[It.RECALCULATE]({key:Rt[Mt],dimension:Rt[Mt],isRecord:!0,formatFun:(Ft=(st=this.indicators)===null||st===void 0?void 0:st.find(Xt=>typeof Xt!="string"&&Xt.indicatorKey===Rt[Mt]))===null||Ft===void 0?void 0:Ft.format,calculateFun:Vt==null?void 0:Vt.calculateFun,dependAggregators:this.tree[v][ne],dependIndicatorKeys:Vt==null?void 0:Vt.dependIndicatorKeys})),ne!==C&&this.tree[v][ne][Mt].push((vt=(Ht=p.tree[v])===null||Ht===void 0?void 0:Ht[C])===null||vt===void 0?void 0:vt[Mt])}else{if(!this.tree[v][ne][Mt]){const Vt=this.getAggregatorRule(Rt[Mt]);this.tree[v][ne][Mt]=new this.aggregators[(Pt=Vt==null?void 0:Vt.aggregationType)!==null&&Pt!==void 0?Pt:It.SUM]({key:Rt[Mt],dimension:(_e=Vt==null?void 0:Vt.field)!==null&&_e!==void 0?_e:Rt[Mt],formatFun:(ge=Vt==null?void 0:Vt.formatFun)!==null&&ge!==void 0?ge:(Le=(gt=this.indicators)===null||gt===void 0?void 0:gt.find(Xt=>typeof Xt!="string"&&Xt.indicatorKey===Rt[Mt]))===null||Le===void 0?void 0:Le.format})}ne!==C&&this.tree[v][ne][Mt].push((me=(Fe=p.tree[v])===null||Fe===void 0?void 0:Fe[C])===null||me===void 0?void 0:me[Mt])}}};if(!((e=(t=p==null?void 0:p.totals)===null||t===void 0?void 0:t.column)===null||e===void 0)&&e.subTotalsDimensions&&((r=(o=(n=p==null?void 0:p.totals)===null||n===void 0?void 0:n.column)===null||o===void 0?void 0:o.subTotalsDimensions)===null||r===void 0?void 0:r.length)>=1||!((l=(s=p==null?void 0:p.totals)===null||s===void 0?void 0:s.row)===null||l===void 0)&&l.subTotalsDimensions&&((d=(h=(a=p==null?void 0:p.totals)===null||a===void 0?void 0:a.row)===null||h===void 0?void 0:h.subTotalsDimensions)===null||d===void 0?void 0:d.length)>=1||!((c=(u=p==null?void 0:p.totals)===null||u===void 0?void 0:u.column)===null||c===void 0)&&c.showGrandTotals||!((f=(g=p==null?void 0:p.totals)===null||g===void 0?void 0:g.row)===null||f===void 0)&&f.showGrandTotals){const v=[];Object.keys(p.tree).forEach(C=>{const S=C.split(this.stringJoinChar);Object.keys(p.tree[C]).forEach(_=>{var y,w,A,R,x,M,T,B,H,k,P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt,pt,xt,G,q;if(!((w=(y=p.totals)===null||y===void 0?void 0:y.row)===null||w===void 0)&&w.subTotalsDimensions&&((x=(R=(A=p.totals)===null||A===void 0?void 0:A.row)===null||R===void 0?void 0:R.subTotalsDimensions)===null||x===void 0?void 0:x.length)>0&&p.totals.row.showSubTotals!==!1)for(let ot=0,ct=(B=(T=(M=p.totals)===null||M===void 0?void 0:M.row)===null||T===void 0?void 0:T.subTotalsDimensions)===null||B===void 0?void 0:B.length;ot<ct;ot++){const _t=p.totals.row.subTotalsDimensions[ot],yt=p.rows.indexOf(_t);if(yt>=0&&yt<p.rows.length-1){const ht=S.slice(0,yt+1);this.rowHierarchyType==="grid"&&ht.push(p.rowSubTotalLabel);const et=ht.join(this.stringJoinChar);this.tree[et]||(this.tree[et]={},v.push(et)),this.tree[et][_]||(this.tree[et][_]=[]);const mt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let st=0;st<mt.length;st++){if(!this.tree[et][_][st])if(this.calculatedFiledKeys.indexOf(mt[st])>=0){const Ft=(H=this.calculatedFieldRules)===null||H===void 0?void 0:H.find(Ht=>Ht.key===mt[st]);this.tree[et][_][st]=new this.aggregators[It.RECALCULATE]({key:mt[st],dimension:mt[st],isRecord:!0,formatFun:(P=(k=this.indicators)===null||k===void 0?void 0:k.find(Ht=>typeof Ht!="string"&&Ht.indicatorKey===mt[st]))===null||P===void 0?void 0:P.format,calculateFun:Ft==null?void 0:Ft.calculateFun,dependAggregators:this.tree[et][_],dependIndicatorKeys:Ft==null?void 0:Ft.dependIndicatorKeys})}else{const Ft=this.getAggregatorRule(mt[st]);this.tree[et][_][st]=new this.aggregators[(E=Ft==null?void 0:Ft.aggregationType)!==null&&E!==void 0?E:It.SUM]({key:mt[st],dimension:(F=Ft==null?void 0:Ft.field)!==null&&F!==void 0?F:mt[st],formatFun:(I=Ft==null?void 0:Ft.formatFun)!==null&&I!==void 0?I:(D=(L=this.indicators)===null||L===void 0?void 0:L.find(Ht=>typeof Ht!="string"&&Ht.indicatorKey===mt[st]))===null||D===void 0?void 0:D.format})}et!==C&&this.tree[et][_][st].push((V=(O=p.tree[C])===null||O===void 0?void 0:O[_])===null||V===void 0?void 0:V[st])}}}if(!((j=(W=p.totals)===null||W===void 0?void 0:W.row)===null||j===void 0)&&j.showGrandTotals||this.columns.length===0){const ot=p.rowGrandTotalLabel;this.tree[ot]||(this.tree[ot]={},v.push(ot)),this.tree[ot][_]||(this.tree[ot][_]=[]);const ct=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let _t=0;_t<ct.length;_t++){if(!this.tree[ot][_][_t])if(this.calculatedFiledKeys.indexOf(ct[_t])>=0){const yt=($=this.calculatedFieldRules)===null||$===void 0?void 0:$.find(ht=>ht.key===ct[_t]);this.tree[ot][_][_t]=new this.aggregators[It.RECALCULATE]({key:ct[_t],dimension:ct[_t],isRecord:!0,formatFun:(K=(X=this.indicators)===null||X===void 0?void 0:X.find(ht=>typeof ht!="string"&&ht.indicatorKey===ct[_t]))===null||K===void 0?void 0:K.format,calculateFun:yt==null?void 0:yt.calculateFun,dependAggregators:this.tree[ot][_],dependIndicatorKeys:yt==null?void 0:yt.dependIndicatorKeys})}else{const yt=this.getAggregatorRule(ct[_t]);this.tree[ot][_][_t]=new this.aggregators[(U=yt==null?void 0:yt.aggregationType)!==null&&U!==void 0?U:It.SUM]({key:ct[_t],dimension:(Q=yt==null?void 0:yt.field)!==null&&Q!==void 0?Q:ct[_t],formatFun:(dt=yt==null?void 0:yt.formatFun)!==null&&dt!==void 0?dt:(xt=(pt=this.indicators)===null||pt===void 0?void 0:pt.find(ht=>typeof ht!="string"&&ht.indicatorKey===ct[_t]))===null||xt===void 0?void 0:xt.format})}ot!==C&&this.tree[ot][_][_t].push((q=(G=p.tree[C])===null||G===void 0?void 0:G[_])===null||q===void 0?void 0:q[_t])}}m(C,_)})}),v.forEach(C=>{Object.keys(p.tree[C]).forEach(S=>{m(C,S)})})}for(const v in p.totalRecordsTree)for(const C in p.totalRecordsTree[v])m(v,C)}ArrToTree1(t,e,n,o,r){const s=[],l=this.stringJoinChar,a=new Map;function h(d){const u=[];let c;d.forEach((g,f)=>{var p;u.push(g);const m=u.join(l);let v=a.get(m);v||(v={value:g,dimensionKey:e[f],children:f===d.length-1&&((p=n==null?void 0:n.length)!==null&&p!==void 0?p:0)>=1?n==null?void 0:n.map(C=>typeof C=="string"?{indicatorKey:C,value:C}:{indicatorKey:C.indicatorKey,value:C.title}):[]},a.set(m,v),c?c.children.push(v):s.push(v)),c=v})}return t.forEach(d=>h(d)),o&&h([r]),s}ArrToTree(t,e,n,o,r,s,l,a,h){var d;let u=[];const c=this.stringJoinChar,g=new Map;if(t!=null&&t.length?t.forEach(f=>function(p){const m=[];let v;p.forEach((C,S)=>{var _,y,w,A;m.push(C);const R=m.join(c);let x=g.get(R);if(!x){if(x={value:C,dimensionKey:e[S],children:S===p.length-1&&((_=n==null?void 0:n.length)!==null&&_!==void 0?_:0)>=1?n==null?void 0:n.map(M=>typeof M=="string"?{indicatorKey:M,value:M}:{indicatorKey:M.indicatorKey,value:M.title}):[]},o[S]){let M=(y=x.children)!==null&&y!==void 0?y:[];const T={value:l,dimensionKey:e[S+1],levelSpan:o.length-S-1,children:((w=n==null?void 0:n.length)!==null&&w!==void 0?w:0)>=1?n==null?void 0:n.map(B=>typeof B=="string"?{indicatorKey:B,value:B}:{indicatorKey:B.indicatorKey,value:B.title}):[]};M.push(T),M=(A=T.children)!==null&&A!==void 0?A:[]}g.set(R,x),v?o[S-1]&&!h?v.children.splice(v.children.length-1,0,x):v.children.push(x):u.push(x)}v=x})}(f)):n&&(u=n==null?void 0:n.map(f=>{var p;return typeof f=="string"?{indicatorKey:f,value:f}:{indicatorKey:f.indicatorKey,value:(p=f.title)!==null&&p!==void 0?p:f.indicatorKey}})),r&&(t==null?void 0:t.length)){const f={value:s,dimensionKey:e[0],levelSpan:o.length,children:(d=n==null?void 0:n.map(p=>typeof p=="string"?{indicatorKey:p,value:p}:{indicatorKey:p.indicatorKey,value:p.title}))!==null&&d!==void 0?d:[]};a?u.unshift(f):u.push(f)}return u}cacheDeminsionCollectedValues(){for(const t in this.collectValuesBy)this.collectValuesBy[t].type!=="xField"&&this.collectValuesBy[t].type!=="yField"||(this.dataConfig.dimensionSortArray?this.cacheCollectedValues[t]=f9(this.collectedValues[t],this.dataConfig.dimensionSortArray):this.cacheCollectedValues[t]=this.collectedValues[t])}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l;const a=this.indicatorKeys.indexOf(n);let h,d;h=typeof t=="string"?t:t.join(this.stringJoinChar),d=typeof e=="string"?e:e.join(this.stringJoinChar),!((r=this.changedTree[h])===null||r===void 0)&&r[d]?this.changedTree[h][d][a]=o:this.changedTree[h]?(this.changedTree[h][d]=[],this.changedTree[h][d][a]=o):(this.changedTree[h]={},this.changedTree[h][d]=[],this.changedTree[h][d][a]=o);const u=(l=(s=this.tree[h])===null||s===void 0?void 0:s[d])===null||l===void 0?void 0:l[a];(u==null?void 0:u.records.length)===1&&(u.records[0][this.indicatorKeys[a]]=o)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.indicatorKeys.length;r++)this.indicatorKeys[r]===t&&(o=!0);if(!o){if(Array.isArray(this.records))for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}else for(const r in this.records)for(let s=0,l=this.records[r].length;s<l;s++){const a=this.records[r][s];a[t]===e&&(a[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}_rowTreeHasChanged(){this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))}changeDataConfig(t){this.rows=t.rows,this.columns=t.columns}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}Array.isArray(this.records)&&this.records.push(t)}customTreeToDimensionPathArr(t,e){const n=[],o=this;function r(s,l){var a,h,d;s.virtual||(!((a=l[l.length-1])===null||a===void 0)&&a.childKeys&&s.dimensionKey&&l[l.length-1].childKeys.indexOf(s.dimensionKey)===-1&&s.dimensionKey!==l[l.length-1].dimensionKey&&l[l.length-1].childKeys.push(s.dimensionKey),l.push({dimensionKey:z(s.indicatorKey)?void 0:s.dimensionKey,value:s.value,indicatorKey:s.indicatorKey,virtual:s.virtual})),((h=s.children)===null||h===void 0?void 0:h.length)>0?(o.rowHierarchyType==="tree"&&e==="row"&&(l[l.length-1].childKeys=[],n.push([...l])),(d=s.children)===null||d===void 0||d.forEach(u=>r(u,[...l]))):n.push(l)}return t==null||t.forEach(s=>r(s,[])),n}getFieldMatchColDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customColTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customColTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}}l&&o.push(s)}return o}getFieldMatchRowDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customRowTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customRowTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}if(h.childKeys&&a===s.length-1&&h.childKeys.length>0&&h.childKeys.find(d=>z(t[d]))){l=!1;break}}l&&(this.indicatorsAsCol||this.rowHierarchyType!=="tree"||s.find(a=>a.indicatorKey)||(l=!1)),l&&o.push(s)}return o}}function f9(i,t){return i.sort((e,n)=>{const o=t.indexOf(e),r=t.indexOf(n);return o<r?-1:o>r?1:0})}let lT=class extends ag{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C;if(Qt.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},e){e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Pe(e.columns),this.internalProps.rows=Pe(e.rows),this.internalProps.indicators=io(e.indicators),(n=e.indicators)===null||n===void 0||n.forEach((_,y)=>{typeof _=="object"&&(_!=null&&_.editor)&&(this.internalProps.indicators[y].editor=_.editor)}),this.internalProps.columnTree=!e.indicatorsAsCol||!((o=e.columns)===null||o===void 0)&&o.length||e.columnTree?Pe(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((r=e.rows)===null||r===void 0)&&r.length||e.rowTree?Pe(e.rowTree):[],this.internalProps.records=e.records,this.pagination=e.pagination,this.internalProps.columnResizeType=(s=e.columnResizeType)!==null&&s!==void 0?s:"column",this.internalProps.rowResizeType=(l=e.rowResizeType)!==null&&l!==void 0?l:"row",this.internalProps.dataConfig=Pe(e.dataConfig),this.internalProps.columnWidthConfig=e.columnWidthConfig;const S=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((a=S==null?void 0:S[0])===null||a===void 0?void 0:a.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((h=e.customConfig)===null||h===void 0?void 0:h.enableDataAnalysis)===!1){const _=new Me((d=this.internalProps.columnTree)!==null&&d!==void 0?d:[],this.layoutNodeId),y=new Me((u=this.internalProps.rowTree)!==null&&u!==void 0?u:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(c=this.options.rowExpandLevel)!==null&&c!==void 0?c:1:void 0);this.internalProps.layoutMap=new Jo(this,null,_,y),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new nv({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey},S))}else{const _=SA(this,e),{rowKeys:y,columnKeys:w,indicatorKeys:A}=_;let{columnDimensionTree:R,rowDimensionTree:x}=_;this.dataset=new xh(this.internalProps.dataConfig,y,w,A,this.internalProps.indicators,(g=e.indicatorsAsCol)===null||g===void 0||g,e.records,e.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!e.extensionRows,!!e.parseCustomTreeToMatchRecords),e.columnTree||(e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,e.indicators)),R=new Me((f=this.dataset.colHeaderTree)!==null&&f!==void 0?f:[],this.layoutNodeId)),e.rowTree||(e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,e.indicators)),x=new Me((p=this.dataset.rowHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(m=this.options.rowExpandLevel)!==null&&m!==void 0?m:1:void 0)),this.internalProps.layoutMap=new Jo(this,this.dataset,R,x)}if(this._changePivotSortStateBySortRules(),((C=(v=e.pivotSortState)===null||v===void 0?void 0:v.length)!==null&&C!==void 0?C:0)>0&&(this.pivotSortState=[],this.pivotSortState=e.pivotSortState),Qt.mode!=="node"&&(this.editorManager=new GA(this)),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.stateManager.initCheckedState(S),this.scenegraph.createSceneGraph(),e.title){const _=Bt.getComponent("title");this.internalProps.title=new _(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const _=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new _(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(nt.INITIALIZED,null)},0)}}static get EVENT_TYPE(){return qo}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!1}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n){if(this.internalProps.layoutMap.isSeriesNumber(t,e)&&this.internalProps.rowSeriesNumber.disableColumnResize===!0)return!1;if(!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S;const _=this.internalProps;if(super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Pe(t.columns),this.internalProps.rows=Pe(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?io(t.indicators):[],(n=t.indicators)===null||n===void 0||n.forEach((w,A)=>{typeof w=="object"&&(w!=null&&w.editor)&&(this.internalProps.indicators[A].editor=w.editor)}),this.internalProps.columnTree=!t.indicatorsAsCol||!((o=t.columns)===null||o===void 0)&&o.length||t.columnTree?Pe(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((r=t.rows)===null||r===void 0)&&r.length||t.rowTree?Pe(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.stateManager.initCheckedState(this.internalProps.records),this.stateManager.updateDrillState(void 0,void 0,!1,!1,-1,-1),this.pagination=t.pagination,_.columnResizeType=(s=t.columnResizeType)!==null&&s!==void 0?s:"column",_.rowResizeType=(l=t.rowResizeType)!==null&&l!==void 0?l:"row",_.dataConfig=Pe(t.dataConfig),this.internalProps.columnWidthConfig=t.columnWidthConfig,(t==null?void 0:t.rowHierarchyType)==="tree"&&this.internalProps.layoutMap.rowHierarchyType==="tree"&&this.internalProps.layoutMap.rowExpandLevel===(t==null?void 0:t.rowExpandLevel)){const w=this.internalProps.layoutMap.rowDimensionTree.tree.children;(a=this.internalProps.rowTree)===null||a===void 0||a.forEach((A,R)=>{const x=w.find(M=>M.dimensionKey===A.dimensionKey&&M.value===A.value);x&&this._syncHierarchyState(x,A)})}const y=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((h=y==null?void 0:y[0])===null||h===void 0?void 0:h.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((d=t.customConfig)===null||d===void 0?void 0:d.enableDataAnalysis)===!1){let w,A;t.columnTree&&(w=new Me((u=this.internalProps.columnTree)!==null&&u!==void 0?u:[],this.layoutNodeId)),t.rowTree&&(A=new Me((c=this.internalProps.rowTree)!==null&&c!==void 0?c:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(g=this.options.rowExpandLevel)!==null&&g!==void 0?g:1:void 0)),_.layoutMap=new Jo(this,null,w,A),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new nv({rows:_.layoutMap.fullRowDimensionKeys,columns:_.layoutMap.colDimensionKeys,indicators:_.layoutMap.indicatorKeys,indicatorsAsCol:_.layoutMap.indicatorsAsCol,indicatorDimensionKey:_.layoutMap.indicatorDimensionKey},y))}else{const w=SA(this,t),{rowKeys:A,columnKeys:R,indicatorKeys:x}=w;let{columnDimensionTree:M,rowDimensionTree:T}=w;this.dataset=new xh(_.dataConfig,A,R,x,this.internalProps.indicators,(f=t.indicatorsAsCol)===null||f===void 0||f,y,t.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!t.extensionRows,!!t.parseCustomTreeToMatchRecords),t.columnTree||(t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,t.indicators)),M=new Me((p=this.dataset.colHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId)),t.rowTree||(t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,t.indicators)),T=new Me((m=this.dataset.rowHeaderTree)!==null&&m!==void 0?m:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(v=this.options.rowExpandLevel)!==null&&v!==void 0?v:1:void 0)),_.layoutMap=new Jo(this,this.dataset,M,T)}if(this._changePivotSortStateBySortRules(),((S=(C=t.pivotSortState)===null||C===void 0?void 0:C.length)!==null&&S!==void 0?S:0)>0&&(this.pivotSortState=[],this.pivotSortState=t.pivotSortState),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,_.releaseList&&(_.releaseList.forEach(w=>{var A;return(A=w==null?void 0:w.release)===null||A===void 0?void 0:A.call(w)}),_.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const w=Bt.getComponent("title");this.internalProps.title=new w(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const w=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new w(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(w=>{setTimeout(w,0)})}updatePagination(t){t?(this.pagination||(this.pagination={currentPage:0,perPageCount:0}),typeof t.currentPage=="number"&&t.currentPage>=0&&(this.pagination.currentPage=t.currentPage),t.perPageCount&&(this.pagination.perPageCount=t.perPageCount||this.pagination.perPageCount),this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(this.pagination),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render()):this.pagination&&(this.pagination=void 0,this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(void 0),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render())}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a,h;const d=this,{layoutMap:u}=d.internalProps;u&&(d.colCount=(t=u.colCount)!==null&&t!==void 0?t:0,d.rowCount=(e=u.rowCount)!==null&&e!==void 0?e:0,this.internalProps.frozenColCount=Math.max(((n=u.rowHeaderLevelCount)!==null&&n!==void 0?n:0)+u.leftRowSeriesNumberColumnCount,(o=this.options.frozenColCount)!==null&&o!==void 0?o:0),d.frozenRowCount=Math.max(u.headerLevelCount,(r=this.options.frozenRowCount)!==null&&r!==void 0?r:0),d.bottomFrozenRowCount!==((s=this.options.bottomFrozenRowCount)!==null&&s!==void 0?s:0)&&(d.bottomFrozenRowCount=(l=this.options.bottomFrozenRowCount)!==null&&l!==void 0?l:0),d.rightFrozenColCount!==((a=this.options.rightFrozenColCount)!==null&&a!==void 0?a:0)&&(d.rightFrozenColCount=(h=this.options.rightFrozenColCount)!==null&&h!==void 0?h:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}get rowHierarchyType(){return this.internalProps.layoutMap.rowHierarchyType}_syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;if(!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r){const a=t.children.find(h=>h.dimensionKey===r.dimensionKey&&h.value===r.value);a&&this._syncHierarchyState(a,r)}}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getFieldData(t,e,n){var o,r,s;if(!this.internalProps.layoutMap.isHeader(e,n)){if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(n),a=this.getBodyIndexByCol(e);return(o=this.records[l])===null||o===void 0?void 0:o[a]}if(this.dataset){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n);if(l){let a;const h=(r=l.colHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(s=l.rowHeaderPaths)===null||s===void 0?void 0:s.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(e,n),!0,a);if(u.records&&u.records.length>=1)return u.records[0][t]}}else if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(e,n).indicatorKey,!1);if(d!=null&&d.record)return d==null?void 0:d.record[t]}}}getCellValue(t,e,n){var o,r,s,l,a,h,d;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isSeriesNumber(t,e)){if(this.internalProps.layoutMap.isSeriesNumberInHeader(t,e)){const{title:c}=this.internalProps.layoutMap.getSeriesNumberHeader(t,e);return c}const{format:u}=this.internalProps.layoutMap.getSeriesNumberBody(t,e);return typeof u=="function"?u(t,e,this):e-this.columnHeaderLevelCount+1}if(this.internalProps.layoutMap.isHeader(t,e)){const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.internalProps.recordsIsTwoDimensionalArray){const{fieldFormat:u}=this.internalProps.layoutMap.getBody(t,e),c=this.getBodyIndexByRow(e),g=this.getBodyIndexByCol(t),f=(o=this.records[c])===null||o===void 0?void 0:o[g];return typeof u=="function"?u(f,t,e,this):f}if(this.dataset){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e);let c;const g=(s=(r=u.colHeaderPaths)===null||r===void 0?void 0:r.filter(v=>!v.virtual))===null||s===void 0?void 0:s.map((v,C)=>{var S;return v.indicatorKey&&(c={position:"col",index:C}),(S=v.indicatorKey)!==null&&S!==void 0?S:v.value}),f=(a=(l=u.rowHeaderPaths)===null||l===void 0?void 0:l.filter(v=>!v.virtual))===null||a===void 0?void 0:a.map((v,C)=>{var S;return v.indicatorKey&&(c={position:"row",index:C}),(S=v.indicatorKey)!==null&&S!==void 0?S:v.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,c),{fieldFormat:m}=this.internalProps.layoutMap.getBody(t,e);return p.formatValue?p.formatValue(t,e,this):typeof m=="function"?m(p==null?void 0:p.value(),t,e,this):(h=p==null?void 0:p.value())!==null&&h!==void 0?h:""}if(this.flatDataToObjects){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e),c=u.colHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),g=u.rowHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),f=this.flatDataToObjects.getTreeNode(g,c,this.internalProps.layoutMap.getBody(t,e).indicatorKey),{fieldFormat:p}=this.internalProps.layoutMap.getBody(t,e);return typeof p=="function"?p(f==null?void 0:f.value,t,e,this):(d=f==null?void 0:f.value)!==null&&d!==void 0?d:""}}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return d==null?void 0:d.value}}getCellRawValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return d==null?void 0:d.value}}getCellOriginRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return h==null?void 0:h.record}}}getCellRawRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return h==null?void 0:h.record}}}updateSortRules(t,e,n){this.internalProps.dataConfig?this.internalProps.dataConfig.sortRules=t:this.internalProps.dataConfig={sortRules:t},this.dataset.updateSortRules(t),this._changePivotSortStateBySortRules();const{layoutMap:o}=this.internalProps;o.resetHeaderTree(),this.scenegraph.clearCells(),at(e)&&at(n)?(this.isRowHeader(e,n)?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):this.isCornerHeader(e,n)?o.cornerSetting.titleOnDimension==="column"?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):o.cornerSetting.titleOnDimension==="row"&&this.internalProps._heightResizedRowMap.clear():this.isColumnHeader(e,n)&&this.internalProps._heightResizedRowMap.clear(),this.refreshRowColCount()):this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(!0),this.render()}_changePivotSortStateBySortRules(){var t,e,n,o;this.pivotSortState=[];const r=(e=(t=this.internalProps.dataConfig)===null||t===void 0?void 0:t.sortRules)!==null&&e!==void 0?e:[];for(let s=0;s<r.length;s++){const l=r[s],a=[];if(l.sortByIndicator&&l.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])){for(let d=0;d<l.query.length;d++)a.push({dimensionKey:this.dataset.indicatorsAsCol?this.dataset.columns[d]:this.dataset.rows[d],value:l.query[d]});a.push({indicatorKey:l.sortByIndicator,value:(o=(n=this.internalProps.layoutMap.getIndicatorInfo(l.sortByIndicator))===null||n===void 0?void 0:n.title)!==null&&o!==void 0?o:l.sortByIndicator})}else a.push({dimensionKey:l.sortField,isPivotCorner:!0,value:l.sortField});const h=l.sortType?l.sortType.toUpperCase():"ASC";this.pivotSortState.push({dimensions:a,order:hi[h]})}}_parseColumnWidthConfig(t){for(let e=0;e<(t==null?void 0:t.length);e++){const n=t[e],o=n.dimensions,r=n.width,s=this.getCellAddressByHeaderPaths(o);s&&!this.internalProps._widthResizedColMap.has(s.col)&&(this._setColWidth(s.col,r),this.internalProps._widthResizedColMap.add(s.col))}}updatePivotSortState(t){this.pivotSortState=t}sort(t,e,n){var o;let r;if(this.isCornerHeader(t,e)){const a=this.getHeaderDefine(t,e);r=[];const h={isPivotCorner:!0,dimensionKey:a.value,value:a.value};r.push(h)}else r=this.isColumnHeader(t,e)?this.getCellHeaderPaths(t,e).colHeaderPaths:this.getCellHeaderPaths(t,e).rowHeaderPaths;const s=r[r.length-1].indicatorKey,l=this.getHeaderDefine(t,e);if(l.sort){if(this.dataset.sortRules){const a={};for(let h=this.dataset.sortRules.length-1;h>=0;h--){const d=this.dataset.sortRules[h];l.dimensionKey&&d.sortField===l.dimensionKey?(a[d.sortField]=d,this.dataset.sortRules.splice(h,1)):s&&d.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])&&this.dataset.sortRules.splice(h,1)}s?this.dataset.sortRules.push({sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:hi[n],sortByIndicator:s,query:r.reduce((h,d)=>(d.dimensionKey&&h.push(d.value),h),[])}):this.dataset.sortRules.push(Object.assign((o=a[l.dimensionKey])!==null&&o!==void 0?o:{},{sortField:l.dimensionKey,sortType:hi[n]}))}else this.dataset.sortRules=s?[{sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:hi[n],sortByIndicator:s,query:r.reduce((a,h)=>(h.dimensionKey&&a.push(h.value),a),[])}]:[{sortField:l.dimensionKey,sortType:hi[n]}];this.updateSortRules(this.dataset.sortRules,t,e)}}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const r=this.pivotSortState[o],s=r.dimensions,l=this.getCellAddressByHeaderPaths(s),a=r.order;if(l&&Vi(n,l.col,l.row))return a}}_moveHeaderPosition(t,e){const n=this.getCellRange(t.col,t.row),o=this.getCellRange(e.col,e.row),r=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(r){if(r.moveType==="column"){if(this.internalProps.recordsIsTwoDimensionalArray)for(let s=0;s<this.internalProps.records.length;s++){const l=this.internalProps.records[s].splice(r.sourceIndex-this.rowHeaderLevelCount,r.sourceSize);l.unshift(r.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[s],l)}this.colWidthsMap.exchangeOrder(n.start.col,n.end.col-n.start.col+1,o.start.col,o.end.col-o.start.col+1,r.targetIndex),this.setMinMaxLimitWidth()}else if(r.moveType==="row"){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.internalProps.records.splice(r.sourceIndex-this.columnHeaderLevelCount,r.sourceSize);s.unshift(r.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,s)}r.targetIndex>r.sourceIndex?this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex+r.sourceSize-r.targetSize,r.targetSize,r.targetIndex):this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex,r.targetSize,r.targetIndex)}return r}return null}toggleHierarchyState(t,e,n=!0){const o=this.getHierarchyState(t,e);if(o===Ot.expand)this._refreshHierarchyState(t,e,n),this.fireListeners(qo.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Ot.collapse});else if(o===Ot.collapse){const r=this.internalProps.layoutMap.getHeadNode(t,e);Array.isArray(r.children)&&this._refreshHierarchyState(t,e,n),this.fireListeners(qo.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Ot.expand,originData:r})}}_refreshHierarchyState(t,e,n=!0,o){let r=!1,s=!1;this.stateManager.updateHoverIcon(t,e,void 0,void 0);const l=this.internalProps.layoutMap.checkHasChart();l&&(this.autoFillWidth&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight));const a=this.internalProps.layoutMap.toggleHierarchyState(t,e);o&&o(),this.refreshRowColCount(),this.clearCellStyleCache(),this.scenegraph.updateHierarchyIcon(t,e),this.scenegraph.updateRow(a.removeCellPositions,a.addCellPositions,a.updateCellPositions,n),l&&(this.autoFillWidth&&!r&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&!s&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight),(this.widthMode==="adaptive"||r||this.heightMode==="adaptive"||s)&&this.scenegraph.updateChartSizeForResizeColWidth(-1))}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}setRecords(t){var e,n,o,r,s;const l={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t,this.internalProps.recordsIsTwoDimensionalArray=!1,((e=t==null?void 0:t[0])===null||e===void 0?void 0:e.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0);const a=this.options,h=this.internalProps;if(((n=this.options.customConfig)===null||n===void 0?void 0:n.enableDataAnalysis)===!1)this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new nv({rows:h.layoutMap.fullRowDimensionKeys,columns:h.layoutMap.colDimensionKeys,indicators:h.layoutMap.indicatorKeys,indicatorsAsCol:h.layoutMap.indicatorsAsCol,indicatorDimensionKey:h.layoutMap.indicatorDimensionKey},t));else{let d,u;this.dataset.setRecords(t),d=a.columnTree?h.layoutMap.columnDimensionTree:new Me((o=this.dataset.colHeaderTree)!==null&&o!==void 0?o:[],this.layoutNodeId),u=a.rowTree?h.layoutMap.rowDimensionTree:new Me((r=this.dataset.rowHeaderTree)!==null&&r!==void 0?r:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(s=this.options.rowExpandLevel)!==null&&s!==void 0?s:1:void 0),h.layoutMap=new Jo(this,this.dataset,d,u),this.pivotSortState=[],a.pivotSortState&&(this.pivotSortState=a.pivotSortState)}if(this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(l.col,l.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder(),this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const d=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new d(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}}startEditCell(t,e,n){var o;if(z(t)&&z(e))this.eventManager.isDraging=!1,this.selectCell(t,e),this.editorManager.startEditCell(t,e,n);else if(!((o=this.stateManager.select)===null||o===void 0)&&o.cellPos){const{col:r,row:s}=this.stateManager.select.cellPos;z(r)&&z(s)&&this.editorManager.startEditCell(r,s,n)}}completeEditCell(){this.editorManager.completeEdit()}getEditor(t,e){var n,o,r;let s;if(this.isCornerHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(n=l==null?void 0:l.headerEditor)!==null&&n!==void 0?n:this.options.headerEditor}else if(this.isHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(o=l==null?void 0:l.headerEditor)!==null&&o!==void 0?o:this.options.headerEditor}else{const l=this.getBodyColumnDefine(t,e);s=(r=l==null?void 0:l.editor)!==null&&r!==void 0?r:this.options.editor}return typeof s=="function"&&(s=s({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),typeof s=="string"?DA(s):s}isHasEditorDefine(t,e){var n;const o=this.getBodyColumnDefine(t,e);let r=(n=o==null?void 0:o.editor)!==null&&n!==void 0?n:this.options.editor;return typeof r=="function"&&(r=r({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),z(r)}changeCellValue(t,e,n,o=!1){if(o&&this.isHasEditorDefine(t,e)||o===!1){let r=n;const s=this.getCellOriginValue(t,e),l=this.getCellRawValue(t,e);typeof l=="number"&&X0(n)&&(r=parseFloat(n)),this._changeCellValueToDataSet(t,e,s,r);const a=this.getCellRange(t,e);for(let h=a.start.col;h<=a.end.col;h++)for(let d=a.start.row;d<=a.end.row;d++)this.scenegraph.updateCellContent(h,d);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else if(!this.internalProps._widthResizedColMap.has(t)){const h=this.getColWidth(t),d=Ar(t,0,this.rowCount-1,this,!1);d!==h&&this.scenegraph.updateColWidth(t,d-h)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.internalProps._heightResizedRowMap.size===0&&this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"&&!this.internalProps._heightResizedRowMap.has(e)){const h=this.getRowHeight(e),d=Qi(e,0,this.colCount-1,this);this.scenegraph.updateRowHeight(e,d-h)}this.fireListeners(nt.CHANGE_CELL_VALUE,{col:t,row:e,rawValue:l,currentValue:s,changedValue:r}),this.scenegraph.updateNextFrame()}}changeCellValues(t,e,n,o=!1){let r=t,s=e;const l=[],a=[];for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){const c=n[u],g=[],f=[];l.push(g),a.push(f);for(let p=0;p<c.length&&!(t+p>this.colCount-1);p++){const m=this.getCellRawValue(t+p,e+u);g.push(m);const v=this.getCellOriginValue(t+p,e+u);f.push(v)}}for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){s=e+u;const c=n[u];let g=t;for(let f=0;f<c.length&&!(t+f>this.colCount-1);f++)if(g=t+f,o&&this.isHasEditorDefine(t+f,e+u)||o===!1){const p=c[f];let m=p;const v=a[u][f],C=l[u][f];typeof C=="number"&&X0(p)&&(m=parseFloat(p)),this._changeCellValueToDataSet(t+f,e+u,v,m),this.fireListeners(nt.CHANGE_CELL_VALUE,{col:t+f,row:e+u,rawValue:C,currentValue:v,changedValue:this.getCellOriginValue(t+f,e+u)})}r=Math.max(r,g)}const h=this.getCellRange(t,e),d=this.getCellRange(r,s);for(let u=h.start.col;u<=d.end.col;u++)for(let c=h.start.row;c<=d.end.row;c++)this.scenegraph.updateCellContent(u,c);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else for(let u=t;u<=d.end.col;u++)if(!this.internalProps._widthResizedColMap.has(u)){const c=this.getColWidth(u),g=Ar(u,0,this.rowCount-1,this,!1);g!==c&&this.scenegraph.updateColWidth(u,g-c)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"){const u=[],c=[];for(let g=e;g<=d.end.row;g++)if(this.rowHeightsMap.get(g)){const f=this.getRowHeight(g),p=Qi(g,0,this.colCount-1,this);u.push(g),c.push(p-f)}this.scenegraph.updateRowsHeight(u,c)}this.scenegraph.updateNextFrame()}_changeCellValueToDataSet(t,e,n,o){var r,s,l,a,h,d,u,c;if(this.internalProps.recordsIsTwoDimensionalArray){const g=this.getBodyIndexByRow(e),f=this.getBodyIndexByCol(t);this.records[g][f]=o}else if(this.dataset){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isCornerHeader(t,e))this.internalProps.layoutMap.changeCornerTitle(t,e,o);else if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.dataset.changeRecordFieldValue(!((r=g.colHeaderPaths)===null||r===void 0)&&r.length?(s=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&s!==void 0?s:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(l=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&l!==void 0?l:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=(a=g.colHeaderPaths)===null||a===void 0?void 0:a.filter(m=>!m.virtual).map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),p=(h=g.rowHeaderPaths)===null||h===void 0?void 0:h.filter(m=>!m.virtual).map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value});this.dataset.changeTreeNodeValue(this.internalProps.layoutMap.indicatorsAsCol?p:p.slice(0,-1),this.internalProps.layoutMap.indicatorsAsCol?f.slice(0,-1):f,this.internalProps.layoutMap.getIndicatorKey(t,e),o)}}else if(this.flatDataToObjects){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.flatDataToObjects.changeRecordFieldValue(!((d=g.colHeaderPaths)===null||d===void 0)&&d.length?(u=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&u!==void 0?u:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(c=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&c!==void 0?c:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=g.colHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value}),p=g.rowHeaderPaths.map(m=>{var v;return(v=m.indicatorKey)!==null&&v!==void 0?v:m.value});this.flatDataToObjects.changeTreeNodeValue(p,f,this.internalProps.layoutMap.getBody(t,e).indicatorKey,o)}}}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}setTreeNodeChildren(t,e,n,o){this.flatDataToObjects?(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.flatDataToObjects.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey}),this.flatDataToObjects.addRecords(e)})):(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.dataset._rowTreeHasChanged(),this.dataset.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys}),this.dataset.addRecords(e)}))}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),this.renderWithRecreateCells()}getFilteredRecords(){var t;return(t=this.dataset)===null||t===void 0?void 0:t.filterRules}};vg(),bg(),Cg(),yg(),_g(),wg(),Sg(),xg(),Rg(),Ag(),Tg(),Mg(),Al(),Bg();class aT extends lT{}Al();class p9 extends lT{}vg(),bg(),Cg(),yg(),_g(),wg(),Sg(),xg(),Rg(),Ag(),Tg(),Mg(),Al(),Bg();let m9=class extends ag{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_;let y,w;Qt.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},this._selectedDataItemsInChart=[],this._selectedDimensionInChart=[],this._chartEventMap={},e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Pe(e.columns),this.internalProps.rows=Pe(e.rows),this.internalProps.indicators=io(e.indicators),this.internalProps.columnTree=!e.indicatorsAsCol||!((n=e.columns)===null||n===void 0)&&n.length||e.columnTree?Pe(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((o=e.rows)===null||o===void 0)&&o.length||e.rowTree?Pe(e.rowTree):[],this.internalProps.records=e.records,this.setCustomStateNameToSpec(),this.internalProps.columnResizeType=(r=e.columnResizeType)!==null&&r!==void 0?r:"column",this.internalProps.rowResizeType=(s=e.rowResizeType)!==null&&s!==void 0?s:"row",this.internalProps.dataConfig={isPivotChart:!0},this._axes=it(e.axes)?e.axes:[],e.columnTree&&(e.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Li(this.internalProps.columnTree,e.indicators)),y=new Me((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),e.rowTree&&(e.indicatorsAsCol===!1&&(this.internalProps.rowTree=Li(this.internalProps.rowTree,e.indicators)),w=new Me((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const A=!((h=w==null?void 0:w.dimensionKeys)===null||h===void 0)&&h.count?w.dimensionKeys.valueArr():(u=(d=e.rows)===null||d===void 0?void 0:d.reduce((M,T)=>(typeof T=="string"?M.push(T):M.push(T.dimensionKey),M),[]))!==null&&u!==void 0?u:[],R=!((c=y==null?void 0:y.dimensionKeys)===null||c===void 0)&&c.count?y.dimensionKeys.valueArr():(f=(g=e.columns)===null||g===void 0?void 0:g.reduce((M,T)=>(typeof T=="string"?M.push(T):M.push(T.dimensionKey),M),[]))!==null&&f!==void 0?f:[],x=(m=(p=e.indicators)===null||p===void 0?void 0:p.reduce((M,T)=>(typeof T=="string"?M.push(T):M.push(T.indicatorKey),M),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(R,A),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new xh(this.internalProps.dataConfig,A,R,x,this.internalProps.indicators,(v=e.indicatorsAsCol)===null||v===void 0||v,e.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&_h(this.internalProps.indicators)){const M=T=>{T.forEach(B=>{var H;!((H=B.children)===null||H===void 0)&&H.length?M(B.children):B.children=[{dimensionKey:"axis",value:""}]})};!((C=this.dataset.rowHeaderTree)===null||C===void 0)&&C.length?M(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(e.columnTree||e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,e.indicators)),e.rowTree||e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,e.indicators)),y=new Me((S=this.dataset.colHeaderTree)!==null&&S!==void 0?S:[],this.layoutNodeId),w=new Me((_=this.dataset.rowHeaderTree)!==null&&_!==void 0?_:[],this.layoutNodeId),this.internalProps.layoutMap=new Jo(this,this.dataset,y,w),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(),e.title){const M=Bt.getComponent("title");this.internalProps.title=new M(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const M=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new M(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(nt.INITIALIZED,null)},0)}static get EVENT_TYPE(){return iA}get pivotChartAxes(){return this._axes}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!0}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n&&!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y;const w=this.internalProps;let A,R;super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Pe(t.columns),this.internalProps.rows=Pe(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?io(t.indicators):[],this.internalProps.columnTree=!t.indicatorsAsCol||!((n=t.columns)===null||n===void 0)&&n.length||t.columnTree?Pe(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((o=t.rows)===null||o===void 0)&&o.length||t.rowTree?Pe(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.setCustomStateNameToSpec(),this._selectedDataItemsInChart=[],w.columnResizeType=(r=t.columnResizeType)!==null&&r!==void 0?r:"column",w.rowResizeType=(s=t.rowResizeType)!==null&&s!==void 0?s:"row",w.dataConfig={isPivotChart:!0},this._axes=it(t.axes)?t.axes:[],t.columnTree&&(t.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Li(this.internalProps.columnTree,t.indicators)),A=new Me((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),t.rowTree&&(t.indicatorsAsCol===!1&&(this.internalProps.rowTree=Li(this.internalProps.rowTree,t.indicators)),R=new Me((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const x=!((h=R==null?void 0:R.dimensionKeys)===null||h===void 0)&&h.count?R.dimensionKeys.valueArr():(u=(d=t.rows)===null||d===void 0?void 0:d.reduce((B,H)=>(typeof H=="string"?B.push(H):B.push(H.dimensionKey),B),[]))!==null&&u!==void 0?u:[],M=!((c=A==null?void 0:A.dimensionKeys)===null||c===void 0)&&c.count?A.dimensionKeys.valueArr():(f=(g=t.columns)===null||g===void 0?void 0:g.reduce((B,H)=>(typeof H=="string"?B.push(H):B.push(H.dimensionKey),B),[]))!==null&&f!==void 0?f:[],T=(m=(p=t.indicators)===null||p===void 0?void 0:p.reduce((B,H)=>(typeof H=="string"?B.push(H):B.push(H.indicatorKey),B),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(M,x),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new xh(this.internalProps.dataConfig,x,M,T,this.internalProps.indicators,(v=t.indicatorsAsCol)===null||v===void 0||v,(C=t.records)!==null&&C!==void 0?C:this.internalProps.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&_h(this.internalProps.indicators)){const B=H=>{H.forEach(k=>{var P;!((P=k.children)===null||P===void 0)&&P.length?B(k.children):k.children=[{dimensionKey:"axis",value:""}]})};!((S=this.dataset.rowHeaderTree)===null||S===void 0)&&S.length?B(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(t.columnTree||t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Li(this.dataset.colHeaderTree,t.indicators)),t.rowTree||t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Li(this.dataset.rowHeaderTree,t.indicators)),A=new Me((_=this.dataset.colHeaderTree)!==null&&_!==void 0?_:[],this.layoutNodeId),R=new Me((y=this.dataset.rowHeaderTree)!==null&&y!==void 0?y:[],this.layoutNodeId),w.layoutMap=new Jo(this,this.dataset,A,R),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,w.releaseList&&(w.releaseList.forEach(B=>{var H;return(H=B==null?void 0:B.release)===null||H===void 0?void 0:H.call(B)}),w.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const B=Bt.getComponent("title");this.internalProps.title=new B(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const B=Bt.getComponent("emptyTip");this.internalProps.emptyTip=new B(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(B=>{setTimeout(B,0)})}updatePagination(){}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a;const h=this,{layoutMap:d}=h.internalProps;d&&(h.colCount=(t=d.colCount)!==null&&t!==void 0?t:0,h.rowCount=(e=d.rowCount)!==null&&e!==void 0?e:0,h.internalProps.frozenColCount=(n=d.rowHeaderLevelCount)!==null&&n!==void 0?n:0,h.frozenRowCount=Math.max(d.headerLevelCount,(o=this.options.frozenRowCount)!==null&&o!==void 0?o:0),h.bottomFrozenRowCount!==((r=d==null?void 0:d.bottomFrozenRowCount)!==null&&r!==void 0?r:0)&&(h.bottomFrozenRowCount=(s=d==null?void 0:d.bottomFrozenRowCount)!==null&&s!==void 0?s:0),h.rightFrozenColCount!==((l=d==null?void 0:d.rightFrozenColCount)!==null&&l!==void 0?l:0)&&(h.rightFrozenColCount=(a=d==null?void 0:d.rightFrozenColCount)!==null&&a!==void 0?a:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r&&this.syncHierarchyState(t.children[s],r)}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getCellValue(t,e,n){var o,r,s;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const g=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let f;return g==null||g.forEach(p=>{const m=this.internalProps.layoutMap.getIndicatorInfo(p);m&&(f=m)}),(r=(o=f==null?void 0:f.title)!==null&&o!==void 0?o:f==null?void 0:f.indicatorKey)!==null&&r!==void 0?r:""}const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.dataset){let u;const c=this.internalProps.layoutMap.getCellHeaderPaths(t,e),g=c.colHeaderPaths.map((m,v)=>{var C;return m.indicatorKey&&(u={position:"col",index:v}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),f=c.rowHeaderPaths.map((m,v)=>{var C;return m.indicatorKey&&(u={position:"row",index:v}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,u);return p.value?p.value():void 0}const{fieldFormat:l}=this.internalProps.layoutMap.getBody(t,e),a=this.getBodyIndexByRow(e),h=this.getBodyIndexByCol(t),d=(s=this.records[a])===null||s===void 0?void 0:s[h];return typeof l=="function"?l(d,t,e,this):d}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const d=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let u;return d==null||d.forEach(c=>{const g=this.internalProps.layoutMap.getIndicatorInfo(c);g&&(u=g)}),(o=(n=u==null?void 0:u.title)!==null&&n!==void 0?n:u==null?void 0:u.indicatorKey)!==null&&o!==void 0?o:""}const{title:h}=s.internalProps.layoutMap.getHeader(t,e);return typeof h=="function"?h():h}if(this.dataset){let h;const d=this.internalProps.layoutMap.getCellHeaderPaths(t,e),u=d.colHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"col",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),c=d.rowHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"row",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),g=this.dataset.getAggregator(c,u,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,h);return g.value?g.value():void 0}const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(r=this.records[l])===null||r===void 0?void 0:r[a]}getCellRawValue(t,e){return this.getCellOriginValue(t,e)}getCellOriginRecord(t,e){if(!this.internalProps.layoutMap.isHeader(t,e)&&this.dataset){let n;const o=this.internalProps.layoutMap.getCellHeaderPaths(t,e),r=o.colHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"col",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value}),s=o.rowHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"row",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value});return this.dataset.getAggregator(s,r,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,n).records}}getCellRawRecord(t,e){return this.getCellOriginRecord(t,e)}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const{col:r,row:s,order:l}=this.pivotSortState[o];if(Vi(n,r,s))return l}}_moveHeaderPosition(t,e){var n,o,r,s;const l=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(l){if(l.moveType==="column"){if(((o=(n=this.options.records)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.constructor)===Array)for(let a=0;a<this.internalProps.records.length;a++){const h=this.internalProps.records[a].splice(l.sourceIndex-this.rowHeaderLevelCount,l.sourceSize);h.unshift(l.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[a],h)}this.colWidthsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize),this.setMinMaxLimitWidth()}else if(l.moveType==="row"){if(((s=(r=this.options.records)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.constructor)===Array){const a=this.internalProps.records.splice(l.sourceIndex-this.columnHeaderLevelCount,l.sourceSize);a.unshift(l.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,a)}this.rowHeightsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize)}return l}return null}toggleHierarchyState(t,e,n=!0){}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}_generateCollectValuesConfig(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S;t=t.filter(w=>w!==ji),e=e.filter(w=>w!==ji);const _=this.internalProps.indicators,y={};for(let w=0,A=_==null?void 0:_.length;w<A;w++)if(typeof _[w]!="string"&&_[w].chartSpec){if(((n=_[w].chartSpec)===null||n===void 0?void 0:n.type)==="pie"||((o=_[w].chartSpec)===null||o===void 0?void 0:o.type)==="rose"||((r=_[w].chartSpec)===null||r===void 0?void 0:r.type)==="radar"||((s=_[w].chartSpec)===null||s===void 0?void 0:s.type)==="gauge"||((l=_[w].chartSpec)===null||l===void 0?void 0:l.type)==="wordCloud")continue;const R=_[w],x=R.chartSpec;if(this.options.indicatorsAsCol===!1)if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[R.indicatorKey]={by:e,range:!0,sumBy:(x==null?void 0:x.stack)&&t.concat(x==null?void 0:x.xField)},x.series)x.series.forEach(M=>{var T,B,H,k,P,E,F,I,L,D,O,V,W,j;const $=typeof M.xField=="string"?M.xField:M.xField[0];y[$]={by:t,type:M.direction!=="horizontal"?"xField":void 0,range:fs(M,this._axes,M.direction==="horizontal",!0),sortBy:M.direction!=="horizontal"?(k=(H=(B=(T=M==null?void 0:M.data)===null||T===void 0?void 0:T.fields)===null||B===void 0?void 0:B[$])===null||H===void 0?void 0:H.domain)!==null&&k!==void 0?k:(F=(E=(P=x==null?void 0:x.data)===null||P===void 0?void 0:P.fields)===null||E===void 0?void 0:E[$])===null||F===void 0?void 0:F.domain:void 0};const X=M.yField;M.stack!==!1&&(M.type==="bar"||M.type==="area")&&(M.stack=!0),y[X]={by:e,range:fs(M,this._axes,M.direction==="horizontal",!1),sumBy:M.stack&&t.concat(M==null?void 0:M.xField),sortBy:M.direction==="horizontal"?(O=(D=(L=(I=M==null?void 0:M.data)===null||I===void 0?void 0:I.fields)===null||L===void 0?void 0:L[X])===null||D===void 0?void 0:D.domain)!==null&&O!==void 0?O:(j=(W=(V=x==null?void 0:x.data)===null||V===void 0?void 0:V.fields)===null||W===void 0?void 0:W[X])===null||j===void 0?void 0:j.domain:void 0,extendRange:pc(x.markLine)}});else{const M=typeof x.xField=="string"?x.xField:x.xField[0];y[M]={by:t,type:x.direction!=="horizontal"?"xField":void 0,range:fs(x,this._axes,x.direction==="horizontal",!0),sortBy:x.direction!=="horizontal"?(d=(h=(a=x==null?void 0:x.data)===null||a===void 0?void 0:a.fields)===null||h===void 0?void 0:h[M])===null||d===void 0?void 0:d.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const T=x.yField;y[T]={by:e,range:x.direction!=="horizontal",sumBy:x.stack&&t.concat(x==null?void 0:x.xField),sortBy:x.direction==="horizontal"?(g=(c=(u=x==null?void 0:x.data)===null||u===void 0?void 0:u.fields)===null||c===void 0?void 0:c[T])===null||g===void 0?void 0:g.domain:void 0,extendRange:pc(x.markLine)}}else{const M=_[w];if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[M.indicatorKey]={by:t,range:!0,sumBy:(x==null?void 0:x.stack)&&e.concat(x==null?void 0:x.yField)},x.series)x.series.forEach(T=>{var B,H,k,P,E,F,I,L,D,O,V,W,j,$;const X=typeof T.yField=="string"?T.yField:T.yField[0];y[X]={by:e,type:T.direction==="horizontal"?"yField":void 0,range:fs(T,this._axes,T.direction==="horizontal",!1),sortBy:T.direction==="horizontal"?(P=(k=(H=(B=T==null?void 0:T.data)===null||B===void 0?void 0:B.fields)===null||H===void 0?void 0:H[X])===null||k===void 0?void 0:k.domain)!==null&&P!==void 0?P:(I=(F=(E=x==null?void 0:x.data)===null||E===void 0?void 0:E.fields)===null||F===void 0?void 0:F[X])===null||I===void 0?void 0:I.domain:void 0};const K=T.xField;T.stack!==!1&&(T.type==="bar"||T.type==="area")&&(T.stack=!0),y[K]={by:t,range:fs(T,this._axes,T.direction==="horizontal",!0),sumBy:T.stack&&e.concat(T==null?void 0:T.yField),sortBy:T.direction!=="horizontal"?(V=(O=(D=(L=T==null?void 0:T.data)===null||L===void 0?void 0:L.fields)===null||D===void 0?void 0:D[K])===null||O===void 0?void 0:O.domain)!==null&&V!==void 0?V:($=(j=(W=x==null?void 0:x.data)===null||W===void 0?void 0:W.fields)===null||j===void 0?void 0:j[K])===null||$===void 0?void 0:$.domain:void 0,extendRange:pc(x.markLine)}});else{const T=typeof x.yField=="string"?x.yField:x.yField[0];y[T]={by:e,type:x.direction==="horizontal"?"yField":void 0,range:fs(x,this._axes,x.direction==="horizontal",!1),sortBy:x.direction==="horizontal"?(m=(p=(f=x==null?void 0:x.data)===null||f===void 0?void 0:f.fields)===null||p===void 0?void 0:p[T])===null||m===void 0?void 0:m.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const B=x.xField;y[B]={by:t,range:fs(x,this._axes,x.direction==="horizontal",!0),sumBy:x.stack&&e.concat(x==null?void 0:x.yField),sortBy:x.direction!=="horizontal"?(S=(C=(v=x==null?void 0:x.data)===null||v===void 0?void 0:v.fields)===null||C===void 0?void 0:C[B])===null||S===void 0?void 0:S.domain:void 0,extendRange:pc(x.markLine)}}}}return y}_generateAggregationRules(){var t;const e=[];return(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:It.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=this.options.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:It.RECORD})}else{const s=this.options.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:It.RECORD})}}),e}setCustomStateNameToSpec(){var t;const e=n=>{var o,r,s,l,a,h,d,u,c,g;!((r=(o=n.bar)===null||o===void 0?void 0:o.state)===null||r===void 0)&&r.selected&&(n.bar.state.vtable_selected=n.bar.state.selected,n.bar.state.vtable_selected_reverse=n.bar.state.selected_reverse,delete n.bar.state.selected,delete n.bar.state.selected_reverse),!((l=(s=n.point)===null||s===void 0?void 0:s.state)===null||l===void 0)&&l.selected&&(n.point.state.vtable_selected=n.point.state.selected,n.point.state.vtable_selected_reverse=n.point.state.selected_reverse,delete n.point.state.selected,delete n.point.state.selected_reverse),!((h=(a=n.line)===null||a===void 0?void 0:a.state)===null||h===void 0)&&h.selected&&(n.line.state.vtable_selected=n.line.state.selected,n.line.state.vtable_selected_reverse=n.line.state.selected_reverse,delete n.line.state.selected,delete n.line.state.selected_reverse),!((u=(d=n.area)===null||d===void 0?void 0:d.state)===null||u===void 0)&&u.selected&&(n.area.state.vtable_selected=n.area.state.selected,n.area.state.vtable_selected_reverse=n.area.state.selected_reverse,delete n.area.state.selected,delete n.area.state.selected_reverse),!((g=(c=n.pie)===null||c===void 0?void 0:c.state)===null||g===void 0)&&g.selected&&(n.pie.state.vtable_selected=n.pie.state.selected,n.pie.state.vtable_selected_reverse=n.pie.state.selected_reverse,delete n.pie.state.selected,delete n.pie.state.selected_reverse)};(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{if(n.chartSpec){const o=n.chartSpec;o.series?o.series.forEach(r=>{e(r)}):e(o)}})}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),ph(this.scenegraph),r6(this.scenegraph),this.render()}clearChartCacheImage(t,e){at(t)&&at(e)?o6(t,e,this.scenegraph):ph(this.scenegraph)}getLegendSelected(){var t;const e=[];return(t=this.internalProps.legends)===null||t===void 0||t.forEach(n=>{const o=n.legendComponent._getSelectedLegends().map(r=>r.label);e.push(...o)}),e}setLegendSelected(t){var e;(e=this.internalProps.legends)===null||e===void 0||e.forEach(n=>{n.legendComponent.setSelected(t)})}getChartDatumPosition(t,e){const{chartInstance:n,bounds:o}=this.getChartInstance(e);if(n){const r=n.convertDatumToPosition(t);return r?{x:Math.round(r.x+o.x1),y:Math.round(r.y+o.y1)}:null}return null}getCellAddressByRecord(t){const e=[],n=[],o={},r=[];this.dataset.dataConfig.aggregationRules.forEach(s=>{if(typeof s.field=="string")o[s.field]=s.indicatorKey,r.push(s.field);else for(let l=0;l<s.field.length;l++)o[s.field[l]]=s.indicatorKey,r.push(s.field[l])});for(const s in t)this.dataset.rows.indexOf(s)>=0&&e.push({dimensionKey:s,value:t[s]}),this.dataset.columns.indexOf(s)>=0&&n.push({dimensionKey:s,value:t[s]}),r.indexOf(s)>=0&&(this.dataset.indicatorsAsCol?n.push({indicatorKey:o[s]}):e.push({indicatorKey:o[s]}));return this.getCellAddressByHeaderPaths({rowHeaderPaths:e,colHeaderPaths:n,cellLocation:"body"})}getChartInstance(t){var e,n,o,r,s;const l=this.getCellAddressByHeaderPaths(t);if(l){const a=this.getCellRelativeRect(l.col,l.row),h=this.scenegraph.getCell(l.col,l.row);let d;const u=(e=h==null?void 0:h.getChildren())===null||e===void 0?void 0:e[0];if(u.attribute.chartInstance){d=u.attribute.chartInstance;const{dataId:c,data:g,axes:f,spec:p}=u.attribute,m=u.getViewBox();if(f==null||f.forEach((v,C)=>{var S,_,y,w;v.type==="linear"?d.updateModelSpecSync({type:"axes",index:C},{min:(_=(S=v.range)===null||S===void 0?void 0:S.min)!==null&&_!==void 0?_:0,max:(w=(y=v.range)===null||y===void 0?void 0:y.max)!==null&&w!==void 0?w:0},!0):v.type==="band"&&d.updateModelSpec({type:"axes",index:C},{domain:v.domain.slice(0)},!0)}),d.updateViewBox({x1:m.x1-u.getRootNode().table.scrollLeft,x2:m.x2-u.getRootNode().table.scrollLeft,y1:m.y1-u.getRootNode().table.scrollTop,y2:m.y2-u.getRootNode().table.scrollTop},!1,!1),typeof c=="string")d.updateDataSync(c,g??[]);else{const v=[];for(const C in c){const S=c[C],_=p.series.find(y=>{var w;return((w=y==null?void 0:y.data)===null||w===void 0?void 0:w.id)===C});v.push({id:C,values:S?(n=g==null?void 0:g.filter(y=>y.hasOwnProperty(S)))!==null&&n!==void 0?n:[]:g??[],fields:(o=_==null?void 0:_.data)===null||o===void 0?void 0:o.fields}),d.updateFullDataSync||d.updateDataSync(C,S?(r=g==null?void 0:g.filter(y=>y.hasOwnProperty(S)))!==null&&r!==void 0?r:[]:g??[])}(s=d.updateFullDataSync)===null||s===void 0||s.call(d,v)}this.renderAsync()}return{chartInstance:d,bounds:a.bounds}}return{}}_getDimensionSortArray(){var t,e;if(!((e=(t=this.options)===null||t===void 0?void 0:t.axes)===null||e===void 0)&&e.length){const n=this.options.indicatorsAsCol?"left":"bottom",o=this.options.axes.find(r=>r.orient===n);if(o&&it(o.domain))return o.domain}}setRecords(t){var e,n;const o={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t;const r=this.options,s=this.internalProps;let l,a;this.dataset.setRecords(t),l=r.columnTree?s.layoutMap.columnDimensionTree:new Me((e=this.dataset.colHeaderTree)!==null&&e!==void 0?e:[],this.layoutNodeId),a=r.rowTree?s.layoutMap.rowDimensionTree:new Me((n=this.dataset.rowHeaderTree)!==null&&n!==void 0?n:[],this.layoutNodeId),s.layoutMap=new Jo(this,this.dataset,l,a),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(o.col,o.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder()}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}};class v9 extends Op{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class hT extends hn{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p;t.direction&&(t.flexDirection=t.direction),!t.justifyContent||t.justifyContent!=="start"&&t.justifyContent!=="end"||(t.justifyContent="flex-"+t.justifyContent),!t.alignItems||t.alignItems!=="start"&&t.alignItems!=="end"||(t.alignItems="flex-"+t.alignItems),!t.alignContent||t.alignContent!=="start"&&t.alignContent!=="end"||(t.alignContent="flex-"+t.alignContent),t.display="flex",t.flexDirection||(t.flexDirection="row"),t.clip=!0,t.fill=(e=t==null?void 0:t.background)===null||e===void 0?void 0:e.fill,t.stroke=(n=t==null?void 0:t.background)===null||n===void 0?void 0:n.stroke,t.lineWidth=(o=t==null?void 0:t.background)===null||o===void 0?void 0:o.lineWidth,t.cornerRadius=(r=t==null?void 0:t.background)===null||r===void 0?void 0:r.cornerRadius;const m=it(t.boundsPadding),v=[(l=(s=t.marginTop)!==null&&s!==void 0?s:m?t.boundsPadding[0]:t.boundsPadding)!==null&&l!==void 0?l:0,(h=(a=t.marginRight)!==null&&a!==void 0?a:m?t.boundsPadding[1]:t.boundsPadding)!==null&&h!==void 0?h:0,(c=(d=t.marginBottom)!==null&&d!==void 0?d:m?(u=t.boundsPadding[2])!==null&&u!==void 0?u:t.boundsPadding[0]:t.boundsPadding)!==null&&c!==void 0?c:0,(p=(g=t.marginLeft)!==null&&g!==void 0?g:m?(f=t.boundsPadding[3])!==null&&f!==void 0?f:t.boundsPadding[1]:t.boundsPadding)!==null&&p!==void 0?p:0];t.boundsPadding=v,super(t)}}class b9 extends hT{constructor(t){t.flexWrap="nowrap",super(t)}}let C9=class extends Do{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g;let f;re(t.iconName)&&(f=fn()[t.iconName],f&&(t.width=(e=t.width)!==null&&e!==void 0?e:f.width,t.height=(n=t.height)!==null&&n!==void 0?n:f.height,t.svg=f.svg,t.cursor=f.cursor)),t.svg&&(t.image=t.svg);const p=it(t.boundsPadding),m=[(r=(o=t.marginTop)!==null&&o!==void 0?o:p?t.boundsPadding[0]:t.boundsPadding)!==null&&r!==void 0?r:0,(l=(s=t.marginRight)!==null&&s!==void 0?s:p?t.boundsPadding[1]:t.boundsPadding)!==null&&l!==void 0?l:0,(d=(a=t.marginBottom)!==null&&a!==void 0?a:p?(h=t.boundsPadding[2])!==null&&h!==void 0?h:t.boundsPadding[0]:t.boundsPadding)!==null&&d!==void 0?d:0,(g=(u=t.marginLeft)!==null&&u!==void 0?u:p?(c=t.boundsPadding[3])!==null&&c!==void 0?c:t.boundsPadding[1]:t.boundsPadding)!==null&&g!==void 0?g:0];t.boundsPadding=m,super(t),this.cache=f}},y9=class extends Do{constructor(t){var e,n,o,r,s,l,a,h,d,u;t.src&&(t.image=t.src),t.shape==="circle"&&(t.cornerRadius=t.width/2);const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}};class _9 extends eu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class w9 extends Si{constructor(t){var e,n,o,r,s,l,a,h,d,u,c;t.textBaseline||(t.textBaseline="top");const g=it(t.boundsPadding),f=[(n=(e=t.marginTop)!==null&&e!==void 0?e:g?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:g?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:g?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:g?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=f,t.fill=(c=t.fill)!==null&&c!==void 0?c:"#000",super(t)}getSize(t){this.AABBBounds.width()}}function S9(i,t=0){return{percent:i,delta:t}}class x9 extends nu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class R9 extends Pa{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}getSize(t){this.AABBBounds.width()}}class A9 extends hn{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=it(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}const T9=Object.freeze(Object.defineProperty({__proto__:null,Arc:x9,CheckBox:mr,Circle:v9,Container:hT,Group:A9,GroupElement:b9,Icon:C9,Image:y9,Line:$p,Radio:Na,Rect:_9,Tag:R9,Text:w9,percentCalc:S9},Symbol.toStringTag,{value:"Module"}));function M9(i){var t,e,n,o,r,s,l,a,h,d,u;const c={seqId:0},g={isPivotChart:!0};let f,p,m,v;i.columnTree&&(i.indicatorsAsCol!==!1&&(m=Li(i.columnTree,i.indicators)),f=new Me((t=i.columnTree)!==null&&t!==void 0?t:[],c)),i.rowTree&&(i.indicatorsAsCol===!1&&(v=Li(i.rowTree,i.indicators)),p=new Me((e=i.rowTree)!==null&&e!==void 0?e:[],c));const C=!((n=p.dimensionKeys)===null||n===void 0)&&n.count?p.dimensionKeys.valueArr():(r=(o=i.rows)===null||o===void 0?void 0:o.reduce((y,w)=>(typeof w=="string"?y.push(w):y.push(w.dimensionKey),y),[]))!==null&&r!==void 0?r:[],S=!((s=f.dimensionKeys)===null||s===void 0)&&s.count?f.dimensionKeys.valueArr():(a=(l=i.columns)===null||l===void 0?void 0:l.reduce((y,w)=>(typeof w=="string"?y.push(w):y.push(w.dimensionKey),y),[]))!==null&&a!==void 0?a:[],_=(d=(h=i.indicators)===null||h===void 0?void 0:h.reduce((y,w)=>(typeof w=="string"?y.push(w):y.push(w.indicatorKey),y),[]))!==null&&d!==void 0?d:[];return g.collectValuesBy=B9(i,S,C),g.aggregationRules=P9(i),{dataset:new xh(g,C,S,_,i.indicators,(u=i.indicatorsAsCol)===null||u===void 0||u,i.records,void 0,m||i.columnTree,v||i.rowTree,!0),columnDimensionTree:f,rowDimensionTree:p,layoutNodeId:c}}function B9(i,t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,v,C,S,_,y,w,A,R,x;const M={};for(let T=0,B=(n=i.indicators)===null||n===void 0?void 0:n.length;T<B;T++)if(typeof i.indicators[T]!="string"&&i.indicators[T].chartSpec)if(i.indicatorsAsCol===!1){const H=i.indicators[T];if(M[H.indicatorKey]={by:e,range:!0,sumBy:((o=H.chartSpec)===null||o===void 0?void 0:o.stack)!==!1&&t.concat((r=H.chartSpec)===null||r===void 0?void 0:r.xField)},H.chartSpec.series)H.chartSpec.series.forEach(k=>{var P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt;const pt=typeof k.xField=="string"?k.xField:k.xField[0];M[pt]={by:t,type:k.direction!=="horizontal"?"xField":void 0,range:k.direction==="horizontal",sortBy:k.direction!=="horizontal"?(I=(F=(E=(P=k==null?void 0:k.data)===null||P===void 0?void 0:P.fields)===null||E===void 0?void 0:E[pt])===null||F===void 0?void 0:F.domain)!==null&&I!==void 0?I:(V=(O=(D=(L=H.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[pt])===null||V===void 0?void 0:V.domain:void 0};const xt=k.yField;M[xt]={by:e,range:k.direction!=="horizontal",sumBy:k.stack!==!1&&t.concat(k==null?void 0:k.xField),sortBy:k.direction==="horizontal"?(X=($=(j=(W=k==null?void 0:k.data)===null||W===void 0?void 0:W.fields)===null||j===void 0?void 0:j[xt])===null||$===void 0?void 0:$.domain)!==null&&X!==void 0?X:(dt=(Q=(U=(K=H.chartSpec)===null||K===void 0?void 0:K.data)===null||U===void 0?void 0:U.fields)===null||Q===void 0?void 0:Q[xt])===null||dt===void 0?void 0:dt.domain:void 0}});else{const k=typeof H.chartSpec.xField=="string"?H.chartSpec.xField:H.chartSpec.xField[0];M[k]={by:t,type:H.chartSpec.direction!=="horizontal"?"xField":void 0,range:H.chartSpec.direction==="horizontal",sortBy:H.chartSpec.direction!=="horizontal"?(h=(a=(l=(s=H.chartSpec)===null||s===void 0?void 0:s.data)===null||l===void 0?void 0:l.fields)===null||a===void 0?void 0:a[k])===null||h===void 0?void 0:h.domain:void 0};const P=H.chartSpec.yField;M[P]={by:e,range:i.indicators[T].chartSpec.direction!=="horizontal",sumBy:H.chartSpec.stack!==!1&&t.concat((d=H.chartSpec)===null||d===void 0?void 0:d.xField),sortBy:H.chartSpec.direction==="horizontal"?(f=(g=(c=(u=H.chartSpec)===null||u===void 0?void 0:u.data)===null||c===void 0?void 0:c.fields)===null||g===void 0?void 0:g[P])===null||f===void 0?void 0:f.domain:void 0}}}else{const H=i.indicators[T];if(M[H.indicatorKey]={by:t,range:!0,sumBy:((p=H.chartSpec)===null||p===void 0?void 0:p.stack)!==!1&&e.concat((m=H.chartSpec)===null||m===void 0?void 0:m.yField)},H.chartSpec.series)H.chartSpec.series.forEach(k=>{var P,E,F,I,L,D,O,V,W,j,$,X,K,U,Q,dt;const pt=typeof k.yField=="string"?k.yField:k.yField[0];M[pt]={by:e,type:k.direction==="horizontal"?"yField":void 0,range:k.direction!=="horizontal",sortBy:k.direction==="horizontal"?(I=(F=(E=(P=k==null?void 0:k.data)===null||P===void 0?void 0:P.fields)===null||E===void 0?void 0:E[pt])===null||F===void 0?void 0:F.domain)!==null&&I!==void 0?I:(V=(O=(D=(L=H.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[pt])===null||V===void 0?void 0:V.domain:void 0};const xt=k.xField;M[xt]={by:t,range:k.direction==="horizontal",sumBy:k.stack!==!1&&e.concat(k==null?void 0:k.yField),sortBy:k.direction!=="horizontal"?(X=($=(j=(W=k==null?void 0:k.data)===null||W===void 0?void 0:W.fields)===null||j===void 0?void 0:j[xt])===null||$===void 0?void 0:$.domain)!==null&&X!==void 0?X:(dt=(Q=(U=(K=H.chartSpec)===null||K===void 0?void 0:K.data)===null||U===void 0?void 0:U.fields)===null||Q===void 0?void 0:Q[xt])===null||dt===void 0?void 0:dt.domain:void 0}});else{const k=typeof H.chartSpec.yField=="string"?H.chartSpec.yField:H.chartSpec.yField[0];M[k]={by:e,type:H.chartSpec.direction==="horizontal"?"yField":void 0,range:H.chartSpec.direction!=="horizontal",sortBy:H.chartSpec.direction==="horizontal"?(_=(S=(C=(v=H.chartSpec)===null||v===void 0?void 0:v.data)===null||C===void 0?void 0:C.fields)===null||S===void 0?void 0:S[k])===null||_===void 0?void 0:_.domain:void 0};const P=H.chartSpec.xField;M[P]={by:t,range:i.indicators[T].chartSpec.direction==="horizontal",sumBy:H.chartSpec.stack!==!1&&e.concat((y=H.chartSpec)===null||y===void 0?void 0:y.yField),sortBy:H.chartSpec.direction!=="horizontal"?(x=(R=(A=(w=H.chartSpec)===null||w===void 0?void 0:w.data)===null||A===void 0?void 0:A.fields)===null||R===void 0?void 0:R[P])===null||x===void 0?void 0:x.domain:void 0}}}return M}function P9(i){var t;const e=[];return(t=i.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:It.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=i.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:It.RECORD})}else{const s=i.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:It.RECORD})}}),e}function H9(i,t,e){var n,o;const r=M9(i);let s=r.columnDimensionTree,l=r.rowDimensionTree,a=!1,h=!1;i.columnTree&&i.indicatorsAsCol&&!s.dimensionKeys.contain(ji)&&(a=!0),i.rowTree&&(i.indicatorsAsCol||l.dimensionKeys.contain(ji)||(h=!0));const{dataset:d,layoutNodeId:u}=r,c={options:i,layoutNodeId:u,internalProps:i,isPivotChart:()=>!0,pivotChartAxes:[],_selectedDataItemsInChart:[],_getActiveChartInstance:()=>({updateState:()=>{}})};i.columnTree&&!a||(s=new Me((n=d.colHeaderTree)!==null&&n!==void 0?n:[],u)),i.rowTree&&!h||(l=new Me((o=d.rowHeaderTree)!==null&&o!==void 0?o:[],u));const g=new Jo(c,d,s,l);for(let f=0;f<g.colCount;f++)for(let p=0;p<g.rowCount;p++){if(g.isHeader(f,p))continue;const m=g.getCellHeaderPaths(f,p),v=m.colHeaderPaths.map(y=>{var w;return(w=y.indicatorKey)!==null&&w!==void 0?w:y.value}),C=m.rowHeaderPaths.map(y=>{var w;return(w=y.indicatorKey)!==null&&w!==void 0?w:y.value}),S=d.getAggregator(g.indicatorsAsCol?C:C.slice(0,-1),g.indicatorsAsCol?v.slice(0,-1):v,g.getIndicatorKey(f,p)),_=E9(S.value?S.value():void 0,t,f,p,g,e);if(_)return _}}function E9(i,t,e,n,o,r){if(it(i)){for(let s=0;s<i.length;s++)if(r?r(i[s],t):k9(i[s],t))return o.getCellHeaderPaths(e,n)}}function k9(i,t){return JSON.stringify(i)===JSON.stringify(t)}function L9(i){return new Pa(i?i.attribute:{})}function F9(i){return new mr(i?i.attribute:{})}function I9(i){return new Na(i?i.attribute:{})}class D9{constructor(t,e){var n,o,r,s,l,a;this.willUpdateRow=!1,this.willUpdateCol=!1,this.table=t,this.rowCount=(n=e==null?void 0:e.rowCount)!==null&&n!==void 0?n:void 0,this.colCount=(o=e==null?void 0:e.colCount)!==null&&o!==void 0?o:void 0,this.animationDuration=(r=e==null?void 0:e.animationDuration)!==null&&r!==void 0?r:500,this.animationDelay=(s=e==null?void 0:e.animationDelay)!==null&&s!==void 0?s:1e3,this.animationEasing=(l=e==null?void 0:e.animationEasing)!==null&&l!==void 0?l:"linear",this.replaceScrollAction=(a=e==null?void 0:e.replaceScrollAction)!==null&&a!==void 0&&a,this.reset(),this.init()}init(){this.replaceScrollAction&&(this.table.disableScroll(),this.table.scenegraph.stage.addEventListener("wheel",this.onScrollEnd.bind(this)))}reset(){this.playing=!1,this.row=this.table.frozenRowCount,this.col=this.table.frozenColCount}onScrollEnd(t){this.rowCount?(t.deltaY>0?(this.row+=this.rowCount,this.row=Math.min(this.row,this.table.rowCount-this.table.frozenRowCount)):t.deltaY<0&&(this.row-=this.rowCount,this.row=Math.max(this.row,this.table.frozenRowCount)),this.table.scrollToRow(this.row,{duration:this.animationDuration,easing:this.animationEasing})):this.colCount&&(t.deltaX>0?(this.col+=this.colCount,this.col=Math.min(this.col,this.table.colCount-this.table.frozenColCount)):t.deltaX<0&&(this.col-=this.colCount,this.col=Math.max(this.col,this.table.frozenColCount)),this.table.scrollToCol(this.col,{duration:this.animationDuration,easing:this.animationEasing}))}play(){this.playing=!0,this.rowCount&&!this.willUpdateRow?this.updateRow():this.colCount&&!this.willUpdateCol&&this.updateCol()}pause(){this.playing=!1}updateRow(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenTopRow!==this.row?(this.row=this.table.frozenRowCount,t=!1):this.row+=this.rowCount,this.table.scrollToRow(this.row,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateRow=!0,setTimeout(()=>{this.willUpdateRow=!1,this.updateRow()},this.animationDuration+this.animationDelay)}updateCol(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenLeftCol!==this.col?(this.col=this.table.frozenColCount,t=!1):this.col+=this.colCount,this.table.scrollToCol(this.col,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateCol=!0,setTimeout(()=>{this.willUpdateCol=!1,this.updateCol()},this.animationDuration+this.animationDelay)}}class O9{constructor(t,e){this.table=t,this.options=e,this.registerStyle(),this.bindEvent()}registerStyle(){var t,e,n,o,r,s,l,a;this.table.registerCustomCellStyle("col-highlight",{bgColor:(e=(t=this.options)===null||t===void 0?void 0:t.colHighlightBGColor)!==null&&e!==void 0?e:"#82b2f5",color:(o=(n=this.options)===null||n===void 0?void 0:n.colHighlightColor)!==null&&o!==void 0?o:"#FFF"}),this.table.registerCustomCellStyle("row-highlight",{bgColor:(s=(r=this.options)===null||r===void 0?void 0:r.rowHighlightBGColor)!==null&&s!==void 0?s:"#82b2f5",color:(a=(l=this.options)===null||l===void 0?void 0:l.rowHighlightColor)!==null&&a!==void 0?a:"#FFF"})}bindEvent(){this.table.on("selected_cell",t=>{this.updateHighlight()}),this.table.on("selected_clear",()=>{this.clearHighlight()}),this.table.on("mousemove_table",()=>{this.table.stateManager.select.selecting&&this.updateHighlight()})}clearHighlight(){this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),this.colHeaderRange=void 0,this.rowHeaderRange=void 0}updateHighlight(){var t,e,n,o;if(((t=this.options)===null||t===void 0?void 0:t.colHighlight)===!1&&((e=this.options)===null||e===void 0?void 0:e.rowHighlight)===!1)return;const r=this.table.getSelectedCellRanges();if(r.length===0)return void this.clearHighlight();const s=r[0],l=[s.start.row,s.end.row];l.sort((u,c)=>u-c);const a=[s.start.col,s.end.col];let h,d;a.sort((u,c)=>u-c),this.table.isPivotTable()?(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}):this.table.internalProps.transpose?d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}:(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},this.table.internalProps.rowSeriesNumber&&(d={start:{col:0,row:l[0]},end:{col:0,row:l[1]}})),((n=this.options)===null||n===void 0?void 0:n.colHighlight)===!1||dT(this.colHeaderRange,h)||(this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),h&&this.table.arrangeCustomCellStyle({range:h},"col-highlight"),this.colHeaderRange=h),((o=this.options)===null||o===void 0?void 0:o.rowHighlight)===!1||dT(this.rowHeaderRange,d)||(this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),d&&this.table.arrangeCustomCellStyle({range:d},"row-highlight"),this.rowHeaderRange=d)}}function dT(i,t){return i===void 0&&t===void 0||i!==void 0&&t!==void 0&&i.start.col===t.start.col&&i.start.row===t.start.row&&i.end.col===t.end.col&&i.end.row===t.end.row}FS();const z9="1.11.1";function W9(){return fn()}function N9(){OA()}const V9=Object.freeze(Object.defineProperty({__proto__:null,CarouselAnimationPlugin:D9,CustomLayout:T9,DataStatistics:E8,EventTarget:Va,HeaderHighlightPlugin:O9,InvertHighlightPlugin:M4,ListTable:d9,ListTableSimple:u9,PIVOT_CHART_EVENT_TYPE:iA,PIVOT_TABLE_EVENT_TYPE:qo,PivotChart:m9,PivotTable:aT,PivotTableSimple:p9,TABLE_EVENT_TYPE:nt,TYPES:bz,VArc:sI,VArea:lI,VCheckBox:F9,VCircle:aI,VGlyph:dI,VGroup:hI,VImage:uI,VLine:cI,VPath:gI,VPolygon:fI,VRadio:I9,VRect:pI,VSymbol:mI,VTag:L9,VText:vI,clearGlobal:N9,core:w8,data:MW,getDataCellPath:H9,getIcons:W9,getTargetCell:wr,graphicUtil:a1,jsx:CI,onBeforeAttributeUpdateForInvertHighlight:Kx,register:T8,registerAxis:vg,registerChartCell:Sg,registerCheckboxCell:xg,registerEmptyTip:bg,registerImageCell:Rg,registerLegend:Cg,registerMenu:yg,registerProgressBarCell:Ag,registerRadioCell:Tg,registerSparkLineCell:Mg,registerTextCell:Al,registerTitle:_g,registerTooltip:wg,registerVideoCell:Bg,renderChart:Pm,restoreMeasureText:O4,setCustomAlphabetCharSet:D4,themes:bW,updateCell:po,version:z9},Symbol.toStringTag,{value:"Module"})),vs=sB.create({baseURL:"/",validateStatus(i){return i===200},timeout:1e3*15});vs.interceptors.request.use(i=>i,i=>Promise.reject(i)),vs.interceptors.response.use(i=>{var t,e;return+((t=i==null?void 0:i.data)==null?void 0:t.code)==500&&Ii.message.error({content:((e=i==null?void 0:i.data)==null?void 0:e.msg)||"服务器异常",key:"SERVER_ERROR"}),i},i=>{if(i.message.includes("timeout"))Ii.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:t}=i.response;t===401?Ii.message.error({content:"当前用户信息不正确",key:"REQUEST_ERROR"}):t>=500?Ii.message.error({content:"服务器异常",key:"REQUEST_ERROR"}):Ii.message.error({content:"请求异常",key:"REQUEST_ERROR"})}return Promise.reject(i)});var uT={},j9={get exports(){return uT},set exports(i){uT=i}};(function(i,t){(function(e,n){i.exports=n(Ol)})(FP,function(e){function n(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=n(e),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var a=100*s+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return o.default.locale(r,null,!0),r})})(j9);const CY="",Ti=(i,t)=>{const e=i.__vccOpts||i;for(const[n,o]of t)e[n]=o;return e};Ol.locale("zh-cn");const $9=b.defineComponent({name:"PivotFilter",props:{data:{type:Object,default:()=>{}},theme:{type:String,default:"light"},graphicConfig:{type:Object,default:()=>({})},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""},customDimensions:{type:Array,default:()=>[]},dimensions:{type:Array,default:()=>[]},indicators:{type:Array,default:()=>[]}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(!1),r=b.ref(!1),s=b.ref([]),l=b.ref(""),a=b.ref(),h=b.ref(""),d=b.ref([]),u=b.ref(),c=b.ref("date"),g=b.ref("date"),f=[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}],p=[{label:"单个日期",value:"date"},{label:"日期范围",value:"range"}],m=T=>{r.value=!1,s.value=T.target.checked?b.unref(d).map(B=>B.value):[]};b.watch(s,T=>{o.value=T.length===b.unref(d).length,r.value=!!T.length&&T.length<b.unref(d).length});const v=async T=>{const{queryColumnList:B=[],edvDataSetId:H="",source:k,dataSourceId:P}=i.graphicConfig;let E=B.find(D=>D.name===T||D.label===T);E||(E=i.customDimensions.find(D=>D.name===T||D.label===T));const F=await vs.post(`${i.indicatorUrl}/diagram/groupvalue`,{source:k,groupColumn:T,hrpIndexTypeGuid:E==null?void 0:E.typeGuid,pageId:i.pageId,pageFlag:!0,edvDataSetId:H,dataSourceId:P},{headers:{Authentication:i.indicatorToken,operateContext:i.context}}),{success:I,data:L=[]}=F.data;I&&(d.value=L.map(D=>({value:D})))},C=b.ref("");async function S(){const{filterData:T,type:B,key:H}=i.data,P=i.dimensions.concat(i.indicators).find(E=>E.label===H);P&&(C.value=P.genericType),b.unref(C)==="DATE"?u.value="date":u.value="select",B==="dimension"?b.unref(u)==="select"?(await v(H),Array.isArray(T)?s.value=T:s.value=(T==null?void 0:T.value)||[]):b.unref(u)==="date"&&(Array.isArray(T)?(c.value="range",(T==null?void 0:T.length)===2&&(a.value=[Ol(T[0].value),Ol(T[1].value)])):(c.value="date",a.value=T!=null&&T.value?Ol(T.value):null)):(l.value=(T==null?void 0:T.rule)||"",a.value=(T==null?void 0:T.value)||""),n.value=!0}const _=b.computed(()=>"YYYY-MM-DD");function y(){var k;const{key:T,type:B}=i.data;let H={};B==="dimension"?b.unref(u)==="select"?H={rule:"IN",value:b.unref(s)}:b.unref(u)==="date"&&(b.unref(c)==="date"?H={rule:"EQUAL",value:((k=b.unref(a))==null?void 0:k.format(b.unref(_)))||""}:b.unref(c)==="range"&&b.unref(a)&&(H=[{rule:"GREATER_EQUAL",value:b.unref(a)[0].format(b.unref(_))},{rule:"LESS_EQUAL",value:b.unref(a)[1].format(b.unref(_))}])):H={rule:b.unref(l),value:b.unref(a)},t("change",{checkKeys:H,key:T,type:B}),n.value=!1}function w(){l.value="",a.value=null}const A=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":""),R=()=>document.getElementsByClassName("filter-modal")[0]||document.body,x=b.computed(()=>{let T="270px";return b.unref(u)==="date"&&(T=""),{padding:"10px",height:T,maxHeight:"280px"}}),M=()=>{a.value=null};return b.watch(n,T=>{window.modalShow&&window.modalShow(T)}),e({showModal:S}),{visible:n,checkAllDimensions:o,dimIndeterminate:r,dimensionCheckKeys:s,ruleValue:l,ruleOptions:f,filterValue:a,searchDimName:h,fontColor:A,valueList:d,filterType:u,dateSelectType:c,bodyStyle:x,dateType:g,dateSelectOptions:p,formatStr:_,handleOk:y,onCheckAllDimChange:m,handleClear:w,getPopupContainer:R,onChangeSelectType:M}}}),G9={class:"wrap-header"},U9={class:"wrap-body"},K9={style:{padding:"20px"}},Y9={style:{padding:"10px 20px"}},X9={key:0,class:"ecan-date-picker"},q9={key:1,class:"ecan-range-picker"},Z9={key:1},J9={style:{padding:"20px"}},Q9={style:{padding:"10px 20px"}};function t7(i,t,e,n,o,r){var p;const s=b.resolveComponent("a-checkbox"),l=b.resolveComponent("a-input"),a=b.resolveComponent("a-checkbox-group"),h=b.resolveComponent("a-select-option"),d=b.resolveComponent("a-select"),u=b.resolveComponent("a-date-picker"),c=b.resolveComponent("a-range-picker"),g=b.resolveComponent("a-button"),f=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(f,{wrapClassName:i.theme+" filter-modal",visible:i.visible,"onUpdate:visible":t[9]||(t[9]=m=>i.visible=m),title:((p=i.data)==null?void 0:p.fieldName)+"-筛选","ok-text":"确认","cancel-text":"取消",bodyStyle:i.bodyStyle,onOk:i.handleOk},{footer:b.withCtx(()=>[b.createVNode(g,{onClick:t[8]||(t[8]=m=>i.visible=!1)},{default:b.withCtx(()=>t[10]||(t[10]=[b.createTextVNode("取消")])),_:1}),i.data.type==="indicators"?(b.openBlock(),b.createBlock(g,{key:0,onClick:i.handleClear},{default:b.withCtx(()=>t[11]||(t[11]=[b.createTextVNode("清除筛选")])),_:1},8,["onClick"])):b.createCommentVNode("",!0),b.createVNode(g,{type:"primary",onClick:i.handleOk},{default:b.withCtx(()=>t[12]||(t[12]=[b.createTextVNode("确定")])),_:1},8,["onClick"])]),default:b.withCtx(()=>[i.data.type==="dimension"?(b.openBlock(),b.createElementBlock("div",{key:0,class:b.normalizeClass(["dimension-wrap",i.filterType==="select"?"border":""])},[i.filterType==="select"?(b.openBlock(),b.createElementBlock(b.Fragment,{key:0},[b.createElementVNode("div",G9,[b.createVNode(s,{checked:i.checkAllDimensions,"onUpdate:checked":t[0]||(t[0]=m=>i.checkAllDimensions=m),indeterminate:i.dimIndeterminate,disabled:!!i.searchDimName,onChange:i.onCheckAllDimChange},{default:b.withCtx(()=>[b.createElementVNode("span",{style:b.normalizeStyle({color:i.fontColor})},"全选",4)]),_:1},8,["checked","indeterminate","disabled","onChange"]),b.createVNode(l,{value:i.searchDimName,"onUpdate:value":t[1]||(t[1]=m=>i.searchDimName=m),placeholder:"请输入关键字搜索",style:{width:"200px","margin-left":"15px"}},null,8,["value"])]),b.createElementVNode("div",U9,[b.createVNode(a,{value:i.dimensionCheckKeys,"onUpdate:value":t[2]||(t[2]=m=>i.dimensionCheckKeys=m),style:{width:"100%"}},{default:b.withCtx(()=>[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.valueList||[],(m,v)=>b.withDirectives((b.openBlock(),b.createElementBlock("div",{class:"body-item",key:v},[b.createVNode(s,{value:m.value},{default:b.withCtx(()=>[b.createElementVNode("span",{style:b.normalizeStyle({color:i.fontColor})},b.toDisplayString(m.value),5)]),_:2},1032,["value"])])),[[b.vShow,!i.searchDimName||m.value.includes(i.searchDimName)]])),128))]),_:1},8,["value"])])],64)):i.filterType==="date"?(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[b.createElementVNode("div",K9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选类型:",4),b.createVNode(d,{value:i.dateSelectType,"onUpdate:value":t[3]||(t[3]=m=>i.dateSelectType=m),style:{width:"200px"},placeholder:"请选择",getPopupContainer:i.getPopupContainer,onChange:i.onChangeSelectType},{default:b.withCtx(()=>[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dateSelectOptions,m=>(b.openBlock(),b.createBlock(h,{key:m.value,value:m.value},{default:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer","onChange"])]),b.createElementVNode("div",Y9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选值:",4),i.dateSelectType==="date"?(b.openBlock(),b.createElementBlock("span",X9,[b.createVNode(u,{dropdownClassName:"ecan-date-picker-dropdown",value:i.filterValue,"onUpdate:value":t[4]||(t[4]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,getPopupContainer:i.getPopupContainer},null,8,["value","picker","format","getPopupContainer"])])):i.dateSelectType==="range"?(b.openBlock(),b.createElementBlock("span",q9,[b.createVNode(c,{dropdownClassName:"ecan-range-picker-dropdown",value:i.filterValue,"onUpdate:value":t[5]||(t[5]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,getPopupContainer:i.getPopupContainer},null,8,["value","picker","format","getPopupContainer"])])):b.createCommentVNode("",!0)])],64)):b.createCommentVNode("",!0)],2)):i.data.type==="indicators"?(b.openBlock(),b.createElementBlock("div",Z9,[b.createElementVNode("div",J9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选规则:",4),b.createVNode(d,{value:i.ruleValue,"onUpdate:value":t[6]||(t[6]=m=>i.ruleValue=m),style:{width:"200px"},placeholder:"请选择",getPopupContainer:i.getPopupContainer},{default:b.withCtx(()=>[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.ruleOptions,m=>(b.openBlock(),b.createBlock(h,{key:m.value,value:m.value},{default:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer"])]),b.createElementVNode("div",Q9,[b.createElementVNode("span",{class:"filter-label",style:b.normalizeStyle({color:i.fontColor})},"筛选值:",4),b.createVNode(l,{value:i.filterValue,"onUpdate:value":t[7]||(t[7]=m=>i.filterValue=m),placeholder:"请输入",style:{width:"200px"}},null,8,["value"])])])):b.createCommentVNode("",!0)]),_:1},8,["wrapClassName","visible","title","bodyStyle","onOk"])}const cT=Ti($9,[["render",t7],["__scopeId","data-v-8942ea1c"]]),e7=b.defineComponent({name:"PivotProperty",props:{theme:{type:String,default:"light"}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref({unit:"",format:"",floatLength:""}),r=[{label:"整数",value:"integer"},{label:"小数",value:"float"},{label:"百分比",value:"percent"}];function s(h){o.value=h,n.value=!0}function l(){t("change",b.unref(o)),n.value=!1}const a=()=>document.getElementsByClassName("property-modal")[0]||document.body;return b.watch(n,h=>{window.modalShow&&window.modalShow(h)}),e({showModal:s}),{visible:n,formData:o,handleOk:l,getPopupContainer:a,formatOptions:r}}});function i7(i,t,e,n,o,r){const s=b.resolveComponent("a-input"),l=b.resolveComponent("a-form-item"),a=b.resolveComponent("a-radio-button"),h=b.resolveComponent("a-radio-group"),d=b.resolveComponent("a-select"),u=b.resolveComponent("a-form"),c=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(c,{wrapClassName:i.theme+" property-modal",visible:i.visible,"onUpdate:visible":t[4]||(t[4]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",title:i.formData.fieldName+"-度量属性",destroyOnClose:!1,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(u,null,{default:b.withCtx(()=>[b.createVNode(l,{label:"度量单位"},{default:b.withCtx(()=>[b.createVNode(s,{value:i.formData.unit,"onUpdate:value":t[0]||(t[0]=g=>i.formData.unit=g)},null,8,["value"])]),_:1}),i.formData.unit?(b.openBlock(),b.createBlock(l,{key:0,label:"度量单位位置"},{default:b.withCtx(()=>[b.createVNode(h,{value:i.formData.position,"onUpdate:value":t[1]||(t[1]=g=>i.formData.position=g),"button-style":"solid"},{default:b.withCtx(()=>[b.createVNode(a,{value:"left"},{default:b.withCtx(()=>t[5]||(t[5]=[b.createTextVNode("数据左侧")])),_:1}),b.createVNode(a,{value:"right"},{default:b.withCtx(()=>t[6]||(t[6]=[b.createTextVNode("数据右侧")])),_:1})]),_:1},8,["value"])]),_:1})):b.createCommentVNode("",!0),b.createVNode(l,{label:"格式化"},{default:b.withCtx(()=>[b.createVNode(d,{value:i.formData.format,"onUpdate:value":t[2]||(t[2]=g=>i.formData.format=g),options:i.formatOptions,getPopupContainer:i.getPopupContainer},null,8,["value","options","getPopupContainer"])]),_:1}),i.formData.format==="float"?(b.openBlock(),b.createBlock(l,{key:1,label:"小数位数"},{default:b.withCtx(()=>[b.createVNode(s,{type:"number",value:i.formData.floatLength,"onUpdate:value":t[3]||(t[3]=g=>i.formData.floatLength=g),min:0},null,8,["value"])]),_:1})):b.createCommentVNode("",!0)]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])}const n7=Ti(e7,[["render",i7]]);function In(i,t){o7(i)&&(i="100%");var e=r7(i);return i=t===360?i:Math.min(t,Math.max(0,parseFloat(i))),e&&(i=parseInt(String(i*t),10)/100),Math.abs(i-t)<1e-6?1:(t===360?i=(i<0?i%t+t:i%t)/parseFloat(String(t)):i=i%t/parseFloat(String(t)),i)}function o7(i){return typeof i=="string"&&i.indexOf(".")!==-1&&parseFloat(i)===1}function r7(i){return typeof i=="string"&&i.indexOf("%")!==-1}function s7(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Pg(i){return i<=1?"".concat(Number(i)*100,"%"):i}function ov(i){return i.length===1?"0"+i:String(i)}function l7(i,t,e){return{r:In(i,255)*255,g:In(t,255)*255,b:In(e,255)*255}}function rv(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?i+(t-i)*(6*e):e<1/2?t:e<2/3?i+(t-i)*(2/3-e)*6:i}function a7(i,t,e){var n,o,r;if(i=In(i,360),t=In(t,100),e=In(e,100),t===0)o=e,r=e,n=e;else{var s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;n=rv(l,s,i+1/3),o=rv(l,s,i),r=rv(l,s,i-1/3)}return{r:n*255,g:o*255,b:r*255}}function h7(i,t,e){i=In(i,255),t=In(t,255),e=In(e,255);var n=Math.max(i,t,e),o=Math.min(i,t,e),r=0,s=n,l=n-o,a=n===0?0:l/n;if(n===o)r=0;else{switch(n){case i:r=(t-e)/l+(t<e?6:0);break;case t:r=(e-i)/l+2;break;case e:r=(i-t)/l+4;break}r/=6}return{h:r,s:a,v:s}}function d7(i,t,e){i=In(i,360)*6,t=In(t,100),e=In(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:h*255,g:d*255,b:u*255}}function u7(i,t,e,n){var o=[ov(Math.round(i).toString(16)),ov(Math.round(t).toString(16)),ov(Math.round(e).toString(16))];return n&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function gT(i){return bn(i)/255}function bn(i){return parseInt(i,16)}var fT={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Rh(i){var t={r:0,g:0,b:0},e=1,n=null,o=null,r=null,s=!1,l=!1;return typeof i=="string"&&(i=f7(i)),typeof i=="object"&&(Qo(i.r)&&Qo(i.g)&&Qo(i.b)?(t=l7(i.r,i.g,i.b),s=!0,l=String(i.r).substr(-1)==="%"?"prgb":"rgb"):Qo(i.h)&&Qo(i.s)&&Qo(i.v)?(n=Pg(i.s),o=Pg(i.v),t=d7(i.h,n,o),s=!0,l="hsv"):Qo(i.h)&&Qo(i.s)&&Qo(i.l)&&(n=Pg(i.s),r=Pg(i.l),t=a7(i.h,n,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(i,"a")&&(e=i.a)),e=s7(e),{ok:s,format:i.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}var c7="[-\\+]?\\d+%?",g7="[-\\+]?\\d*\\.\\d+%?",Pr="(?:".concat(g7,")|(?:").concat(c7,")"),sv="[\\s|\\(]+(".concat(Pr,")[,|\\s]+(").concat(Pr,")[,|\\s]+(").concat(Pr,")\\s*\\)?"),lv="[\\s|\\(]+(".concat(Pr,")[,|\\s]+(").concat(Pr,")[,|\\s]+(").concat(Pr,")[,|\\s]+(").concat(Pr,")\\s*\\)?"),oo={CSS_UNIT:new RegExp(Pr),rgb:new RegExp("rgb"+sv),rgba:new RegExp("rgba"+lv),hsl:new RegExp("hsl"+sv),hsla:new RegExp("hsla"+lv),hsv:new RegExp("hsv"+sv),hsva:new RegExp("hsva"+lv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function f7(i){if(i=i.trim().toLowerCase(),i.length===0)return!1;var t=!1;if(fT[i])i=fT[i],t=!0;else if(i==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=oo.rgb.exec(i);return e?{r:e[1],g:e[2],b:e[3]}:(e=oo.rgba.exec(i),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=oo.hsl.exec(i),e?{h:e[1],s:e[2],l:e[3]}:(e=oo.hsla.exec(i),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=oo.hsv.exec(i),e?{h:e[1],s:e[2],v:e[3]}:(e=oo.hsva.exec(i),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=oo.hex8.exec(i),e?{r:bn(e[1]),g:bn(e[2]),b:bn(e[3]),a:gT(e[4]),format:t?"name":"hex8"}:(e=oo.hex6.exec(i),e?{r:bn(e[1]),g:bn(e[2]),b:bn(e[3]),format:t?"name":"hex"}:(e=oo.hex4.exec(i),e?{r:bn(e[1]+e[1]),g:bn(e[2]+e[2]),b:bn(e[3]+e[3]),a:gT(e[4]+e[4]),format:t?"name":"hex8"}:(e=oo.hex3.exec(i),e?{r:bn(e[1]+e[1]),g:bn(e[2]+e[2]),b:bn(e[3]+e[3]),format:t?"name":"hex"}:!1)))))))))}function Qo(i){return!!oo.CSS_UNIT.exec(String(i))}var Hg=2,pT=.16,p7=.05,m7=.05,v7=.15,mT=5,vT=4,b7=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function bT(i){var t=i.r,e=i.g,n=i.b,o=h7(t,e,n);return{h:o.h*360,s:o.s,v:o.v}}function Eg(i){var t=i.r,e=i.g,n=i.b;return"#".concat(u7(t,e,n,!1))}function C7(i,t,e){var n=e/100,o={r:(t.r-i.r)*n+i.r,g:(t.g-i.g)*n+i.g,b:(t.b-i.b)*n+i.b};return o}function CT(i,t,e){var n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=e?Math.round(i.h)-Hg*t:Math.round(i.h)+Hg*t:n=e?Math.round(i.h)+Hg*t:Math.round(i.h)-Hg*t,n<0?n+=360:n>=360&&(n-=360),n}function yT(i,t,e){if(i.h===0&&i.s===0)return i.s;var n;return e?n=i.s-pT*t:t===vT?n=i.s+pT:n=i.s+p7*t,n>1&&(n=1),e&&t===mT&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function _T(i,t,e){var n;return e?n=i.v+m7*t:n=i.v-v7*t,n>1&&(n=1),Number(n.toFixed(2))}function av(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=[],n=Rh(i),o=mT;o>0;o-=1){var r=bT(n),s=Eg(Rh({h:CT(r,o,!0),s:yT(r,o,!0),v:_T(r,o,!0)}));e.push(s)}e.push(Eg(n));for(var l=1;l<=vT;l+=1){var a=bT(n),h=Eg(Rh({h:CT(a,l),s:yT(a,l),v:_T(a,l)}));e.push(h)}return t.theme==="dark"?b7.map(function(d){var u=d.index,c=d.opacity,g=Eg(C7(Rh(t.backgroundColor||"#141414"),Rh(e[u]),c*100));return g}):e}var hv={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},dv={},uv={};Object.keys(hv).forEach(function(i){dv[i]=av(hv[i]),dv[i].primary=dv[i][5],uv[i]=av(hv[i],{theme:"dark",backgroundColor:"#141414"}),uv[i].primary=uv[i][5]});var wT=[],Ah=[],y7="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function _7(){var i=document.createElement("style");return i.setAttribute("type","text/css"),i}function w7(i,t){if(t=t||{},i===void 0)throw new Error(y7);var e=t.prepend===!0?"prepend":"append",n=t.container!==void 0?t.container:document.querySelector("head"),o=wT.indexOf(n);o===-1&&(o=wT.push(n)-1,Ah[o]={});var r;return Ah[o]!==void 0&&Ah[o][e]!==void 0?r=Ah[o][e]:(r=Ah[o][e]=_7(),e==="prepend"?n.insertBefore(r,n.childNodes[0]):n.appendChild(r)),i.charCodeAt(0)===65279&&(i=i.substr(1,i.length)),r.styleSheet?r.styleSheet.cssText+=i:r.textContent+=i,r}function ST(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){S7(i,o,e[o])})}return i}function S7(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function x7(i,t){process.env.NODE_ENV!=="production"&&!i&&console!==void 0&&console.error("Warning: ".concat(t))}function R7(i,t){x7(i,"[@ant-design/icons-vue] ".concat(t))}function xT(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function cv(i,t,e){return e?b.h(i.tag,ST({key:t},e,i.attrs),(i.children||[]).map(function(n,o){return cv(n,"".concat(t,"-").concat(i.tag,"-").concat(o))})):b.h(i.tag,ST({key:t},i.attrs),(i.children||[]).map(function(n,o){return cv(n,"".concat(t,"-").concat(i.tag,"-").concat(o))}))}function RT(i){return av(i)[0]}function AT(i){return i?Array.isArray(i)?i:[i]:[]}var A7=`
|
|
310
310
|
.anticon {
|
|
311
311
|
display: inline-block;
|
|
312
312
|
color: inherit;
|
|
@@ -362,13 +362,13 @@
|
|
|
362
362
|
}
|
|
363
363
|
`,TT=!1,T7=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A7;b.nextTick(function(){TT||(typeof window<"u"&&window.document&&window.document.documentElement&&w7(t,{prepend:!0}),TT=!0)})},M7=["icon","primaryColor","secondaryColor"];function B7(i,t){if(i==null)return{};var e=P7(i,t),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function P7(i,t){if(i==null)return{};var e={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(t.indexOf(o)>=0)&&(e[o]=i[o]);return e}function kg(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){H7(i,o,e[o])})}return i}function H7(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Th={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function E7(i){var t=i.primaryColor,e=i.secondaryColor;Th.primaryColor=t,Th.secondaryColor=e||RT(t),Th.calculated=!!e}function k7(){return kg({},Th)}var Tl=function(t,e){var n=kg({},t,e.attrs),o=n.icon,r=n.primaryColor,s=n.secondaryColor,l=B7(n,M7),a=Th;if(r&&(a={primaryColor:r,secondaryColor:s||RT(r)}),T7(),R7(xT(o),"icon should be icon definiton, but got ".concat(o)),!xT(o))return null;var h=o;return h&&typeof h.icon=="function"&&(h=kg({},h,{icon:h.icon(a.primaryColor,a.secondaryColor)})),cv(h.icon,"svg-".concat(h.name),kg({},l,{"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};Tl.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},Tl.inheritAttrs=!1,Tl.displayName="IconBase",Tl.getTwoToneColors=k7,Tl.setTwoToneColors=E7;const gv=Tl;function L7(i,t){return O7(i)||D7(i,t)||I7(i,t)||F7()}function F7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
364
364
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I7(i,t){if(i){if(typeof i=="string")return MT(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return MT(i,t)}}function MT(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=i[e];return n}function D7(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var n=[],o=!0,r=!1,s,l;try{for(e=e.call(i);!(o=(s=e.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(a){r=!0,l=a}finally{try{!o&&e.return!=null&&e.return()}finally{if(r)throw l}}return n}}function O7(i){if(Array.isArray(i))return i}function BT(i){var t=AT(i),e=L7(t,2),n=e[0],o=e[1];return gv.setTwoToneColors({primaryColor:n,secondaryColor:o})}function z7(){var i=gv.getTwoToneColors();return i.calculated?[i.primaryColor,i.secondaryColor]:i.primaryColor}var W7=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function N7(i,t){return G7(i)||$7(i,t)||j7(i,t)||V7()}function V7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
365
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j7(i,t){if(i){if(typeof i=="string")return PT(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return PT(i,t)}}function PT(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=i[e];return n}function $7(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var n=[],o=!0,r=!1,s,l;try{for(e=e.call(i);!(o=(s=e.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(a){r=!0,l=a}finally{try{!o&&e.return!=null&&e.return()}finally{if(r)throw l}}return n}}function G7(i){if(Array.isArray(i))return i}function HT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){fv(i,o,e[o])})}return i}function fv(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function U7(i,t){if(i==null)return{};var e=K7(i,t),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function K7(i,t){if(i==null)return{};var e={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(t.indexOf(o)>=0)&&(e[o]=i[o]);return e}BT("#1890ff");var Ml=function(t,e){var n,o=HT({},t,e.attrs),r=o.class,s=o.icon,l=o.spin,a=o.rotate,h=o.tabindex,d=o.twoToneColor,u=o.onClick,c=U7(o,W7),g=(n={anticon:!0},fv(n,"anticon-".concat(s.name),!!s.name),fv(n,r,r),n),f=l===""||l||s.name==="loading"?"anticon-spin":"",p=h;p===void 0&&u&&(p=-1,c.tabindex=p);var m=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,v=AT(d),C=N7(v,2),S=C[0],_=C[1];return b.createVNode("span",HT({role:"img","aria-label":s.name},c,{onClick:u,class:g}),[b.createVNode(gv,{class:f,icon:s,primaryColor:S,secondaryColor:_,style:m},null)])};Ml.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},Ml.displayName="AntdIcon",Ml.inheritAttrs=!1,Ml.getTwoToneColor=z7,Ml.setTwoToneColor=BT;const Fi=Ml;var Y7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const X7=Y7;function ET(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){q7(i,o,e[o])})}return i}function q7(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var pv=function(t,e){var n=ET({},t,e.attrs);return b.createVNode(Fi,ET({},n,{icon:X7}),null)};pv.displayName="ArrowsAltOutlined",pv.inheritAttrs=!1;const Z7=pv;var J7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const Q7=J7;function kT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){tj(i,o,e[o])})}return i}function tj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var mv=function(t,e){var n=kT({},t,e.attrs);return b.createVNode(Fi,kT({},n,{icon:Q7}),null)};mv.displayName="CaretDownOutlined",mv.inheritAttrs=!1;const ej=mv;var ij={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const nj=ij;function LT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){oj(i,o,e[o])})}return i}function oj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var vv=function(t,e){var n=LT({},t,e.attrs);return b.createVNode(Fi,LT({},n,{icon:nj}),null)};vv.displayName="CaretRightOutlined",vv.inheritAttrs=!1;const rj=vv;var sj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const lj=sj;function FT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){aj(i,o,e[o])})}return i}function aj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var bv=function(t,e){var n=FT({},t,e.attrs);return b.createVNode(Fi,FT({},n,{icon:lj}),null)};bv.displayName="DatabaseOutlined",bv.inheritAttrs=!1;const hj=bv;var dj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const uj=dj;function IT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){cj(i,o,e[o])})}return i}function cj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Cv=function(t,e){var n=IT({},t,e.attrs);return b.createVNode(Fi,IT({},n,{icon:uj}),null)};Cv.displayName="DeleteOutlined",Cv.inheritAttrs=!1;const DT=Cv;var gj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};const fj=gj;function OT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){pj(i,o,e[o])})}return i}function pj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var yv=function(t,e){var n=OT({},t,e.attrs);return b.createVNode(Fi,OT({},n,{icon:fj}),null)};yv.displayName="FilterOutlined",yv.inheritAttrs=!1;const zT=yv;var mj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"};const vj=mj;function WT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){bj(i,o,e[o])})}return i}function bj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var _v=function(t,e){var n=WT({},t,e.attrs);return b.createVNode(Fi,WT({},n,{icon:vj}),null)};_v.displayName="FormOutlined",_v.inheritAttrs=!1;const NT=_v;var Cj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M878.7 336H145.3c-18.4 0-33.3 14.3-33.3 32v464c0 17.7 14.9 32 33.3 32h733.3c18.4 0 33.3-14.3 33.3-32V368c.1-17.7-14.8-32-33.2-32zM360 792H184V632h176v160zm0-224H184V408h176v160zm240 224H424V632h176v160zm0-224H424V408h176v160zm240 224H664V632h176v160zm0-224H664V408h176v160zm64-408H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"insert-row-above",theme:"outlined"};const yj=Cj;function VT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){_j(i,o,e[o])})}return i}function _j(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var wv=function(t,e){var n=VT({},t,e.attrs);return b.createVNode(Fi,VT({},n,{icon:yj}),null)};wv.displayName="InsertRowAboveOutlined",wv.inheritAttrs=!1;const wj=wv;var Sj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M248 112h-80c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8zm584 0H368c-17.7 0-32 14.9-32 33.3v733.3c0 18.4 14.3 33.3 32 33.3h464c17.7 0 32-14.9 32-33.3V145.3c0-18.4-14.3-33.3-32-33.3zM568 840H408V664h160v176zm0-240H408V424h160v176zm0-240H408V184h160v176zm224 480H632V664h160v176zm0-240H632V424h160v176zm0-240H632V184h160v176z"}}]},name:"insert-row-left",theme:"outlined"};const xj=Sj;function jT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Rj(i,o,e[o])})}return i}function Rj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Sv=function(t,e){var n=jT({},t,e.attrs);return b.createVNode(Fi,jT({},n,{icon:xj}),null)};Sv.displayName="InsertRowLeftOutlined",Sv.inheritAttrs=!1;const Aj=Sv;var Tj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const Mj=Tj;function $T(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Bj(i,o,e[o])})}return i}function Bj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var xv=function(t,e){var n=$T({},t,e.attrs);return b.createVNode(Fi,$T({},n,{icon:Mj}),null)};xv.displayName="LoadingOutlined",xv.inheritAttrs=!1;const Pj=xv;var Hj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Ej=Hj;function GT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){kj(i,o,e[o])})}return i}function kj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Rv=function(t,e){var n=GT({},t,e.attrs);return b.createVNode(Fi,GT({},n,{icon:Ej}),null)};Rv.displayName="MinusCircleOutlined",Rv.inheritAttrs=!1;const UT=Rv;var Lj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const Fj=Lj;function KT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Ij(i,o,e[o])})}return i}function Ij(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Av=function(t,e){var n=KT({},t,e.attrs);return b.createVNode(Fi,KT({},n,{icon:Fj}),null)};Av.displayName="MinusSquareOutlined",Av.inheritAttrs=!1;const Dj=Av;var Oj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const zj=Oj;function YT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Wj(i,o,e[o])})}return i}function Wj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Tv=function(t,e){var n=YT({},t,e.attrs);return b.createVNode(Fi,YT({},n,{icon:zj}),null)};Tv.displayName="PlusCircleOutlined",Tv.inheritAttrs=!1;const XT=Tv;var Nj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Vj=Nj;function qT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){jj(i,o,e[o])})}return i}function jj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Mv=function(t,e){var n=qT({},t,e.attrs);return b.createVNode(Fi,qT({},n,{icon:Vj}),null)};Mv.displayName="SettingOutlined",Mv.inheritAttrs=!1;const $j=Mv;var Gj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"};const Uj=Gj;function ZT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Kj(i,o,e[o])})}return i}function Kj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Bv=function(t,e){var n=ZT({},t,e.attrs);return b.createVNode(Fi,ZT({},n,{icon:Uj}),null)};Bv.displayName="ShrinkOutlined",Bv.inheritAttrs=!1;const Yj=Bv;var Xj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M320 224h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-60 508h-80V292h80v440zm644-436h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-60 364h-80V364h80v296zM612 404h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8zm-60 145a3 3 0 01-3 3h-74a3 3 0 01-3-3v-74a3 3 0 013-3h74a3 3 0 013 3v74z"}}]},name:"sliders",theme:"outlined"};const qj=Xj;function JT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Zj(i,o,e[o])})}return i}function Zj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Pv=function(t,e){var n=JT({},t,e.attrs);return b.createVNode(Fi,JT({},n,{icon:qj}),null)};Pv.displayName="SlidersOutlined",Pv.inheritAttrs=!1;const Jj=Pv,CY="",Qj=b.defineComponent({name:"ConditionalItemConfig",components:{PlusCircleOutlined:XT,FormOutlined:NT,MinusCircleOutlined:UT},props:{config:{type:Array,default(){return[]}},theme:{type:String,default:"light"}},setup(i,{emit:t}){const e=b.ref("add"),n=b.ref(!1),o=b.ref(-1);b.watch(o,()=>{t("change",b.unref(o))});const r=b.ref("");function s(){e.value="add",r.value="",n.value=!0}function l(){if(b.unref(o)===-1){Ii.message.info("请选择要修改的条件项");return}e.value="edit",r.value=i.config[b.unref(o)].name,n.value=!0}function a(){if(b.unref(o)===-1){Ii.message.info("请选择要删除的条件项");return}i.config.splice(b.unref(o),1),o.value=-1}function h(){b.unref(e)==="add"?i.config.push({name:b.unref(r),conditions:[]}):i.config[b.unref(o)].name=b.unref(r),n.value=!1}const d=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":"");return b.watch(n,u=>{u&&window.modalShow&&window.modalShow(u)}),{modalType:e,visible:n,selectedIndex:o,addItem:s,name:r,handleOk:h,editItem:l,deleteItem:a,fontColor:d}}}),t$={class:"content"},e$={style:{display:"flex","align-items":"center"}},i$={class:"list"},n$=["onClick"];function o$(i,t,e,n,o,r){const s=b.resolveComponent("plus-circle-outlined"),l=b.resolveComponent("a-button"),a=b.resolveComponent("form-outlined"),h=b.resolveComponent("minus-circle-outlined"),d=b.resolveComponent("a-input"),u=b.resolveComponent("a-form-item"),c=b.resolveComponent("a-form"),g=b.resolveComponent("a-modal");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",t$,[b.createElementVNode("div",e$,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},"条件项配置",4),b.createElementVNode("div",null,[b.createVNode(l,{class:"condition-button",onClick:i.addItem},{default:b.withCtx(()=>[b.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick"]),b.createVNode(l,{class:"condition-button",onClick:i.editItem},{default:b.withCtx(()=>[b.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick"]),b.createVNode(l,{class:"condition-button",onClick:i.deleteItem},{default:b.withCtx(()=>[b.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick"])])]),b.createElementVNode("div",i$,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.config,(f,p)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["list-item",i.selectedIndex===p?"active":""]),key:p,onClick:m=>i.selectedIndex=p,style:b.normalizeStyle({color:i.fontColor})},b.toDisplayString(f.name),15,n$))),128))])]),b.createVNode(g,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=f=>i.visible=f),title:i.modalType==="add"?"添加条件项":"修改条件项","ok-text":"确认","cancel-text":"取消",destroyOnClose:!1,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(c,{name:"conditionItem"},{default:b.withCtx(()=>[b.createVNode(u,{label:"条件项名称"},{default:b.withCtx(()=>[b.createVNode(d,{value:i.name,"onUpdate:value":t[0]||(t[0]=f=>i.name=f)},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])],64)}const r$=Ti(Qj,[["render",o$],["__scopeId","data-v-629e6ec8"]]),yY="",s$=b.defineComponent({name:"ConditionalConfig",components:{PlusCircleOutlined:XT,FormOutlined:NT,MinusCircleOutlined:UT},props:{config:{type:Array,default(){return[]}},isSelected:{type:Boolean},theme:{type:String,default:"light"}},setup(i){const t=b.ref("add"),e=b.ref(!1),n=b.ref(-1),o=b.ref({}),r=b.ref(!1),s=b.ref(),l=b.computed(()=>v=>{const C=`当前值 ${v.operation} ${v.value}`;return v.join?`${v.join} ${C}`:C});b.watch(()=>i.config,()=>{n.value=-1});const a=[{label:"与",value:"and"},{label:"或",value:"or"}],h=[{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"<="},{label:"等于",value:"=="},{label:"不等于",value:"!="}],d={operation:[{required:!0,message:"操作符不能为空"}],value:[{required:!0,message:"值不能为空"}]};function u(){t.value="add",r.value=i.config.length>0,b.unref(r)?o.value={join:"and",operation:"",value:""}:o.value={operation:"",value:""},e.value=!0}function c(){if(b.unref(n)===-1){Ii.message.info("请选择要修改的条件配置");return}t.value="edit",r.value=b.unref(n)!==0,o.value=i.config[b.unref(n)],e.value=!0}function g(){if(b.unref(n)===-1){Ii.message.info("请选择要删除的条件配置");return}i.config.splice(b.unref(n),1),n.value=-1}function f(){b.unref(s).validateFields().then(()=>{b.unref(t)==="add"?i.config.push(b.unref(o)):i.config[b.unref(n)]=b.unref(o),e.value=!1}).catch(()=>{})}const p=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":""),m=()=>document.getElementsByClassName("update-config-modal")[0]||document.body;return b.watch(e,v=>{v&&window.modalShow&&window.modalShow(v)}),{modalType:t,visible:e,selectedIndex:n,addItem:u,handleOk:f,editItem:c,deleteItem:g,operateOptions:h,formData:o,joinOptions:a,isShowJoin:r,formRules:d,formRef:s,conditionTitle:l,fontColor:p,getPopupContainer:m}}}),l$={class:"content"},a$={style:{display:"flex","align-items":"center"}},h$={class:"list"},d$=["onClick"];function u$(i,t,e,n,o,r){const s=b.resolveComponent("plus-circle-outlined"),l=b.resolveComponent("a-button"),a=b.resolveComponent("form-outlined"),h=b.resolveComponent("minus-circle-outlined"),d=b.resolveComponent("a-select"),u=b.resolveComponent("a-form-item"),c=b.resolveComponent("a-input"),g=b.resolveComponent("a-form"),f=b.resolveComponent("a-modal");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",l$,[b.createElementVNode("div",a$,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},"条件配置",4),b.createElementVNode("div",null,[b.createVNode(l,{class:"condition-button",onClick:i.addItem,disabled:!i.isSelected},{default:b.withCtx(()=>[b.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick","disabled"]),b.createVNode(l,{class:"condition-button",onClick:i.editItem,disabled:!i.isSelected},{default:b.withCtx(()=>[b.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick","disabled"]),b.createVNode(l,{class:"condition-button",onClick:i.deleteItem,disabled:!i.isSelected},{default:b.withCtx(()=>[b.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick","disabled"])])]),b.createElementVNode("div",h$,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.config,(p,m)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["list-item",i.selectedIndex===m?"active":""]),key:m,onClick:v=>i.selectedIndex=m,style:b.normalizeStyle({color:i.fontColor})},b.toDisplayString(i.conditionTitle(p)),15,d$))),128))])]),b.createVNode(f,{wrapClassName:i.theme+" update-config-modal",visible:i.visible,"onUpdate:visible":t[3]||(t[3]=p=>i.visible=p),title:i.modalType==="add"?"添加条件配置":"修改条件配置","ok-text":"确认","cancel-text":"取消",destroyOnClose:!1,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(g,{model:i.formData,rules:i.formRules,ref:"formRef"},{default:b.withCtx(()=>[i.isShowJoin?(b.openBlock(),b.createBlock(u,{key:0,label:"与上一条件关系",name:"join",required:!0},{default:b.withCtx(()=>[b.createVNode(d,{options:i.joinOptions,value:i.formData.join,"onUpdate:value":t[0]||(t[0]=p=>i.formData.join=p),getPopupContainer:i.getPopupContainer},null,8,["options","value","getPopupContainer"])]),_:1})):b.createCommentVNode("",!0),b.createVNode(u,{label:"操作符",name:"operation",required:!0},{default:b.withCtx(()=>[b.createVNode(d,{options:i.operateOptions,value:i.formData.operation,"onUpdate:value":t[1]||(t[1]=p=>i.formData.operation=p),getPopupContainer:i.getPopupContainer},null,8,["options","value","getPopupContainer"])]),_:1}),b.createVNode(u,{label:"值",name:"value",required:!0},{default:b.withCtx(()=>[b.createVNode(c,{type:"number",value:i.formData.value,"onUpdate:value":t[2]||(t[2]=p=>i.formData.value=p),style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["wrapClassName","visible","title","onOk"])],64)}const c$=Ti(s$,[["render",u$],["__scopeId","data-v-20645a9e"]]);var en="top",Dn="bottom",On="right",nn="left",Hv="auto",Mh=[en,Dn,On,nn],Bl="start",Bh="end",g$="clippingParents",QT="viewport",Ph="popper",f$="reference",tM=Mh.reduce(function(i,t){return i.concat([t+"-"+Bl,t+"-"+Bh])},[]),eM=[].concat(Mh,[Hv]).reduce(function(i,t){return i.concat([t,t+"-"+Bl,t+"-"+Bh])},[]),p$="beforeRead",m$="read",v$="afterRead",b$="beforeMain",C$="main",y$="afterMain",_$="beforeWrite",w$="write",S$="afterWrite",x$=[p$,m$,v$,b$,C$,y$,_$,w$,S$];function yo(i){return i?(i.nodeName||"").toLowerCase():null}function Cn(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function bs(i){var t=Cn(i).Element;return i instanceof t||i instanceof Element}function zn(i){var t=Cn(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Ev(i){if(typeof ShadowRoot>"u")return!1;var t=Cn(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function R$(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];!zn(r)||!yo(r)||(Object.assign(r.style,n),Object.keys(o).forEach(function(s){var l=o[s];l===!1?r.removeAttribute(s):r.setAttribute(s,l===!0?"":l)}))})}function A$(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],r=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),l=s.reduce(function(a,h){return a[h]="",a},{});!zn(o)||!yo(o)||(Object.assign(o.style,l),Object.keys(r).forEach(function(a){o.removeAttribute(a)}))})}}const T$={name:"applyStyles",enabled:!0,phase:"write",fn:R$,effect:A$,requires:["computeStyles"]};function _o(i){return i.split("-")[0]}var Cs=Math.max,Lg=Math.min,Pl=Math.round;function kv(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function iM(){return!/^((?!chrome|android).)*safari/i.test(kv())}function Hl(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=i.getBoundingClientRect(),o=1,r=1;t&&zn(i)&&(o=i.offsetWidth>0&&Pl(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&Pl(n.height)/i.offsetHeight||1);var s=bs(i)?Cn(i):window,l=s.visualViewport,a=!iM()&&e,h=(n.left+(a&&l?l.offsetLeft:0))/o,d=(n.top+(a&&l?l.offsetTop:0))/r,u=n.width/o,c=n.height/r;return{width:u,height:c,top:d,right:h+u,bottom:d+c,left:h,x:h,y:d}}function Lv(i){var t=Hl(i),e=i.offsetWidth,n=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:n}}function nM(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Ev(e)){var n=t;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function tr(i){return Cn(i).getComputedStyle(i)}function M$(i){return["table","td","th"].indexOf(yo(i))>=0}function Hr(i){return((bs(i)?i.ownerDocument:i.document)||window.document).documentElement}function Fg(i){return yo(i)==="html"?i:i.assignedSlot||i.parentNode||(Ev(i)?i.host:null)||Hr(i)}function oM(i){return!zn(i)||tr(i).position==="fixed"?null:i.offsetParent}function B$(i){var t=/firefox/i.test(kv()),e=/Trident/i.test(kv());if(e&&zn(i)){var n=tr(i);if(n.position==="fixed")return null}var o=Fg(i);for(Ev(o)&&(o=o.host);zn(o)&&["html","body"].indexOf(yo(o))<0;){var r=tr(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}function Hh(i){for(var t=Cn(i),e=oM(i);e&&M$(e)&&tr(e).position==="static";)e=oM(e);return e&&(yo(e)==="html"||yo(e)==="body"&&tr(e).position==="static")?t:e||B$(i)||t}function Fv(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Eh(i,t,e){return Cs(i,Lg(t,e))}function P$(i,t,e){var n=Eh(i,t,e);return n>e?e:n}function rM(){return{top:0,right:0,bottom:0,left:0}}function sM(i){return Object.assign({},rM(),i)}function lM(i,t){return t.reduce(function(e,n){return e[n]=i,e},{})}var H$=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,sM(typeof t!="number"?t:lM(t,Mh))};function E$(i){var t,e=i.state,n=i.name,o=i.options,r=e.elements.arrow,s=e.modifiersData.popperOffsets,l=_o(e.placement),a=Fv(l),h=[nn,On].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!s)){var u=H$(o.padding,e),c=Lv(r),g=a==="y"?en:nn,f=a==="y"?Dn:On,p=e.rects.reference[d]+e.rects.reference[a]-s[a]-e.rects.popper[d],m=s[a]-e.rects.reference[a],v=Hh(r),C=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,S=p/2-m/2,_=u[g],y=C-c[d]-u[f],w=C/2-c[d]/2+S,A=Eh(_,w,y),R=a;e.modifiersData[n]=(t={},t[R]=A,t.centerOffset=A-w,t)}}function k$(i){var t=i.state,e=i.options,n=e.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||nM(t.elements.popper,o)&&(t.elements.arrow=o))}const L$={name:"arrow",enabled:!0,phase:"main",fn:E$,effect:k$,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function El(i){return i.split("-")[1]}var F$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function I$(i,t){var e=i.x,n=i.y,o=t.devicePixelRatio||1;return{x:Pl(e*o)/o||0,y:Pl(n*o)/o||0}}function aM(i){var t,e=i.popper,n=i.popperRect,o=i.placement,r=i.variation,s=i.offsets,l=i.position,a=i.gpuAcceleration,h=i.adaptive,d=i.roundOffsets,u=i.isFixed,c=s.x,g=c===void 0?0:c,f=s.y,p=f===void 0?0:f,m=typeof d=="function"?d({x:g,y:p}):{x:g,y:p};g=m.x,p=m.y;var v=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),S=nn,_=en,y=window;if(h){var w=Hh(e),A="clientHeight",R="clientWidth";if(w===Cn(e)&&(w=Hr(e),tr(w).position!=="static"&&l==="absolute"&&(A="scrollHeight",R="scrollWidth")),w=w,o===en||(o===nn||o===On)&&r===Bh){_=Dn;var x=u&&w===y&&y.visualViewport?y.visualViewport.height:w[A];p-=x-n.height,p*=a?1:-1}if(o===nn||(o===en||o===Dn)&&r===Bh){S=On;var M=u&&w===y&&y.visualViewport?y.visualViewport.width:w[R];g-=M-n.width,g*=a?1:-1}}var T=Object.assign({position:l},h&&F$),B=d===!0?I$({x:g,y:p},Cn(e)):{x:g,y:p};if(g=B.x,p=B.y,a){var H;return Object.assign({},T,(H={},H[_]=C?"0":"",H[S]=v?"0":"",H.transform=(y.devicePixelRatio||1)<=1?"translate("+g+"px, "+p+"px)":"translate3d("+g+"px, "+p+"px, 0)",H))}return Object.assign({},T,(t={},t[_]=C?p+"px":"",t[S]=v?g+"px":"",t.transform="",t))}function D$(i){var t=i.state,e=i.options,n=e.gpuAcceleration,o=n===void 0?!0:n,r=e.adaptive,s=r===void 0?!0:r,l=e.roundOffsets,a=l===void 0?!0:l,h={placement:_o(t.placement),variation:El(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,aM(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,aM(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const O$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:D$,data:{}};var Ig={passive:!0};function z$(i){var t=i.state,e=i.instance,n=i.options,o=n.scroll,r=o===void 0?!0:o,s=n.resize,l=s===void 0?!0:s,a=Cn(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",e.update,Ig)}),l&&a.addEventListener("resize",e.update,Ig),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",e.update,Ig)}),l&&a.removeEventListener("resize",e.update,Ig)}}const W$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:z$,data:{}};var N$={left:"right",right:"left",bottom:"top",top:"bottom"};function Dg(i){return i.replace(/left|right|bottom|top/g,function(t){return N$[t]})}var V$={start:"end",end:"start"};function hM(i){return i.replace(/start|end/g,function(t){return V$[t]})}function Iv(i){var t=Cn(i),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Dv(i){return Hl(Hr(i)).left+Iv(i).scrollLeft}function j$(i,t){var e=Cn(i),n=Hr(i),o=e.visualViewport,r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;var h=iM();(h||!h&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:r,height:s,x:l+Dv(i),y:a}}function $$(i){var t,e=Hr(i),n=Iv(i),o=(t=i.ownerDocument)==null?void 0:t.body,r=Cs(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Cs(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-n.scrollLeft+Dv(i),a=-n.scrollTop;return tr(o||e).direction==="rtl"&&(l+=Cs(e.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}function Ov(i){var t=tr(i),e=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+n)}function dM(i){return["html","body","#document"].indexOf(yo(i))>=0?i.ownerDocument.body:zn(i)&&Ov(i)?i:dM(Fg(i))}function kh(i,t){var e;t===void 0&&(t=[]);var n=dM(i),o=n===((e=i.ownerDocument)==null?void 0:e.body),r=Cn(n),s=o?[r].concat(r.visualViewport||[],Ov(n)?n:[]):n,l=t.concat(s);return o?l:l.concat(kh(Fg(s)))}function zv(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function G$(i,t){var e=Hl(i,!1,t==="fixed");return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function uM(i,t,e){return t===QT?zv(j$(i,e)):bs(t)?G$(t,e):zv($$(Hr(i)))}function U$(i){var t=kh(Fg(i)),e=["absolute","fixed"].indexOf(tr(i).position)>=0,n=e&&zn(i)?Hh(i):i;return bs(n)?t.filter(function(o){return bs(o)&&nM(o,n)&&yo(o)!=="body"}):[]}function K$(i,t,e,n){var o=t==="clippingParents"?U$(i):[].concat(t),r=[].concat(o,[e]),s=r[0],l=r.reduce(function(a,h){var d=uM(i,h,n);return a.top=Cs(d.top,a.top),a.right=Lg(d.right,a.right),a.bottom=Lg(d.bottom,a.bottom),a.left=Cs(d.left,a.left),a},uM(i,s,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function cM(i){var t=i.reference,e=i.element,n=i.placement,o=n?_o(n):null,r=n?El(n):null,s=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,a;switch(o){case en:a={x:s,y:t.y-e.height};break;case Dn:a={x:s,y:t.y+t.height};break;case On:a={x:t.x+t.width,y:l};break;case nn:a={x:t.x-e.width,y:l};break;default:a={x:t.x,y:t.y}}var h=o?Fv(o):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case Bl:a[h]=a[h]-(t[d]/2-e[d]/2);break;case Bh:a[h]=a[h]+(t[d]/2-e[d]/2);break}}return a}function Lh(i,t){t===void 0&&(t={});var e=t,n=e.placement,o=n===void 0?i.placement:n,r=e.strategy,s=r===void 0?i.strategy:r,l=e.boundary,a=l===void 0?g$:l,h=e.rootBoundary,d=h===void 0?QT:h,u=e.elementContext,c=u===void 0?Ph:u,g=e.altBoundary,f=g===void 0?!1:g,p=e.padding,m=p===void 0?0:p,v=sM(typeof m!="number"?m:lM(m,Mh)),C=c===Ph?f$:Ph,S=i.rects.popper,_=i.elements[f?C:c],y=K$(bs(_)?_:_.contextElement||Hr(i.elements.popper),a,d,s),w=Hl(i.elements.reference),A=cM({reference:w,element:S,strategy:"absolute",placement:o}),R=zv(Object.assign({},S,A)),x=c===Ph?R:w,M={top:y.top-x.top+v.top,bottom:x.bottom-y.bottom+v.bottom,left:y.left-x.left+v.left,right:x.right-y.right+v.right},T=i.modifiersData.offset;if(c===Ph&&T){var B=T[o];Object.keys(M).forEach(function(H){var k=[On,Dn].indexOf(H)>=0?1:-1,P=[en,Dn].indexOf(H)>=0?"y":"x";M[H]+=B[P]*k})}return M}function Y$(i,t){t===void 0&&(t={});var e=t,n=e.placement,o=e.boundary,r=e.rootBoundary,s=e.padding,l=e.flipVariations,a=e.allowedAutoPlacements,h=a===void 0?eM:a,d=El(n),u=d?l?tM:tM.filter(function(f){return El(f)===d}):Mh,c=u.filter(function(f){return h.indexOf(f)>=0});c.length===0&&(c=u);var g=c.reduce(function(f,p){return f[p]=Lh(i,{placement:p,boundary:o,rootBoundary:r,padding:s})[_o(p)],f},{});return Object.keys(g).sort(function(f,p){return g[f]-g[p]})}function X$(i){if(_o(i)===Hv)return[];var t=Dg(i);return[hM(i),t,hM(t)]}function q$(i){var t=i.state,e=i.options,n=i.name;if(!t.modifiersData[n]._skip){for(var o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,l=s===void 0?!0:s,a=e.fallbackPlacements,h=e.padding,d=e.boundary,u=e.rootBoundary,c=e.altBoundary,g=e.flipVariations,f=g===void 0?!0:g,p=e.allowedAutoPlacements,m=t.options.placement,v=_o(m),C=v===m,S=a||(C||!f?[Dg(m)]:X$(m)),_=[m].concat(S).reduce(function(j,$){return j.concat(_o($)===Hv?Y$(t,{placement:$,boundary:d,rootBoundary:u,padding:h,flipVariations:f,allowedAutoPlacements:p}):$)},[]),y=t.rects.reference,w=t.rects.popper,A=new Map,R=!0,x=_[0],M=0;M<_.length;M++){var T=_[M],B=_o(T),H=El(T)===Bl,k=[en,Dn].indexOf(B)>=0,P=k?"width":"height",E=Lh(t,{placement:T,boundary:d,rootBoundary:u,altBoundary:c,padding:h}),F=k?H?On:nn:H?Dn:en;y[P]>w[P]&&(F=Dg(F));var I=Dg(F),L=[];if(r&&L.push(E[B]<=0),l&&L.push(E[F]<=0,E[I]<=0),L.every(function(j){return j})){x=T,R=!1;break}A.set(T,L)}if(R)for(var D=f?3:1,O=function($){var X=_.find(function(K){var U=A.get(K);if(U)return U.slice(0,$).every(function(Q){return Q})});if(X)return x=X,"break"},V=D;V>0;V--){var W=O(V);if(W==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}const Z$={name:"flip",enabled:!0,phase:"main",fn:q$,requiresIfExists:["offset"],data:{_skip:!1}};function gM(i,t,e){return e===void 0&&(e={x:0,y:0}),{top:i.top-t.height-e.y,right:i.right-t.width+e.x,bottom:i.bottom-t.height+e.y,left:i.left-t.width-e.x}}function fM(i){return[en,On,Dn,nn].some(function(t){return i[t]>=0})}function J$(i){var t=i.state,e=i.name,n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,s=Lh(t,{elementContext:"reference"}),l=Lh(t,{altBoundary:!0}),a=gM(s,n),h=gM(l,o,r),d=fM(a),u=fM(h);t.modifiersData[e]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const Q$={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:J$};function tG(i,t,e){var n=_o(i),o=[nn,en].indexOf(n)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,s=r[0],l=r[1];return s=s||0,l=(l||0)*o,[nn,On].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function eG(i){var t=i.state,e=i.options,n=i.name,o=e.offset,r=o===void 0?[0,0]:o,s=eM.reduce(function(d,u){return d[u]=tG(u,t.rects,r),d},{}),l=s[t.placement],a=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=h),t.modifiersData[n]=s}const iG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eG};function nG(i){var t=i.state,e=i.name;t.modifiersData[e]=cM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oG={name:"popperOffsets",enabled:!0,phase:"read",fn:nG,data:{}};function rG(i){return i==="x"?"y":"x"}function sG(i){var t=i.state,e=i.options,n=i.name,o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,l=s===void 0?!1:s,a=e.boundary,h=e.rootBoundary,d=e.altBoundary,u=e.padding,c=e.tether,g=c===void 0?!0:c,f=e.tetherOffset,p=f===void 0?0:f,m=Lh(t,{boundary:a,rootBoundary:h,padding:u,altBoundary:d}),v=_o(t.placement),C=El(t.placement),S=!C,_=Fv(v),y=rG(_),w=t.modifiersData.popperOffsets,A=t.rects.reference,R=t.rects.popper,x=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,M=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(w){if(r){var H,k=_==="y"?en:nn,P=_==="y"?Dn:On,E=_==="y"?"height":"width",F=w[_],I=F+m[k],L=F-m[P],D=g?-R[E]/2:0,O=C===Bl?A[E]:R[E],V=C===Bl?-R[E]:-A[E],W=t.elements.arrow,j=g&&W?Lv(W):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rM(),X=$[k],K=$[P],U=Eh(0,A[E],j[E]),Q=S?A[E]/2-D-U-X-M.mainAxis:O-U-X-M.mainAxis,dt=S?-A[E]/2+D+U+K+M.mainAxis:V+U+K+M.mainAxis,pt=t.elements.arrow&&Hh(t.elements.arrow),xt=pt?_==="y"?pt.clientTop||0:pt.clientLeft||0:0,G=(H=T==null?void 0:T[_])!=null?H:0,q=F+Q-G-xt,ot=F+dt-G,ct=Eh(g?Lg(I,q):I,F,g?Cs(L,ot):L);w[_]=ct,B[_]=ct-F}if(l){var _t,yt=_==="x"?en:nn,ht=_==="x"?Dn:On,et=w[y],mt=y==="y"?"height":"width",st=et+m[yt],Ft=et-m[ht],Ht=[en,nn].indexOf(v)!==-1,vt=(_t=T==null?void 0:T[y])!=null?_t:0,Pt=Ht?st:et-A[mt]-R[mt]-vt+M.altAxis,_e=Ht?et+A[mt]+R[mt]-vt-M.altAxis:Ft,ge=g&&Ht?P$(Pt,et,_e):Eh(g?Pt:st,et,g?_e:Ft);w[y]=ge,B[y]=ge-et}t.modifiersData[n]=B}}const lG={name:"preventOverflow",enabled:!0,phase:"main",fn:sG,requiresIfExists:["offset"]};function aG(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function hG(i){return i===Cn(i)||!zn(i)?Iv(i):aG(i)}function dG(i){var t=i.getBoundingClientRect(),e=Pl(t.width)/i.offsetWidth||1,n=Pl(t.height)/i.offsetHeight||1;return e!==1||n!==1}function uG(i,t,e){e===void 0&&(e=!1);var n=zn(t),o=zn(t)&&dG(t),r=Hr(t),s=Hl(i,o,e),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!e)&&((yo(t)!=="body"||Ov(r))&&(l=hG(t)),zn(t)?(a=Hl(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):r&&(a.x=Dv(r))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function cG(i){var t=new Map,e=new Set,n=[];i.forEach(function(r){t.set(r.name,r)});function o(r){e.add(r.name);var s=[].concat(r.requires||[],r.requiresIfExists||[]);s.forEach(function(l){if(!e.has(l)){var a=t.get(l);a&&o(a)}}),n.push(r)}return i.forEach(function(r){e.has(r.name)||o(r)}),n}function gG(i){var t=cG(i);return x$.reduce(function(e,n){return e.concat(t.filter(function(o){return o.phase===n}))},[])}function fG(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function pG(i){var t=i.reduce(function(e,n){var o=e[n.name];return e[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var pM={placement:"bottom",modifiers:[],strategy:"absolute"};function mM(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function mG(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,n=e===void 0?[]:e,o=t.defaultOptions,r=o===void 0?pM:o;return function(l,a,h){h===void 0&&(h=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},pM,r),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},u=[],c=!1,g={state:d,setOptions:function(v){var C=typeof v=="function"?v(d.options):v;p(),d.options=Object.assign({},r,d.options,C),d.scrollParents={reference:bs(l)?kh(l):l.contextElement?kh(l.contextElement):[],popper:kh(a)};var S=gG(pG([].concat(n,d.options.modifiers)));return d.orderedModifiers=S.filter(function(_){return _.enabled}),f(),g.update()},forceUpdate:function(){if(!c){var v=d.elements,C=v.reference,S=v.popper;if(mM(C,S)){d.rects={reference:uG(C,Hh(S),d.options.strategy==="fixed"),popper:Lv(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(M){return d.modifiersData[M.name]=Object.assign({},M.data)});for(var _=0;_<d.orderedModifiers.length;_++){if(d.reset===!0){d.reset=!1,_=-1;continue}var y=d.orderedModifiers[_],w=y.fn,A=y.options,R=A===void 0?{}:A,x=y.name;typeof w=="function"&&(d=w({state:d,options:R,name:x,instance:g})||d)}}}},update:fG(function(){return new Promise(function(m){g.forceUpdate(),m(d)})}),destroy:function(){p(),c=!0}};if(!mM(l,a))return g;g.setOptions(h).then(function(m){!c&&h.onFirstUpdate&&h.onFirstUpdate(m)});function f(){d.orderedModifiers.forEach(function(m){var v=m.name,C=m.options,S=C===void 0?{}:C,_=m.effect;if(typeof _=="function"){var y=_({state:d,name:v,instance:g,options:S}),w=function(){};u.push(y||w)}})}function p(){u.forEach(function(m){return m()}),u=[]}return g}}var vG=[W$,oG,O$,T$,iG,Z$,lG,L$,Q$],bG=mG({defaultModifiers:vG});function Wv(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=Array(t);e<t;e++)n[e]=i[e];return n}function vM(i,t){if(i){if(typeof i=="string")return Wv(i,t);var e={}.toString.call(i).slice(8,-1);return e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set"?Array.from(i):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Wv(i,t):void 0}}function CG(i){return function(t){if(Array.isArray(t))return Wv(t)}(i)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(i)||vM(i)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
365
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j7(i,t){if(i){if(typeof i=="string")return PT(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return PT(i,t)}}function PT(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=i[e];return n}function $7(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var n=[],o=!0,r=!1,s,l;try{for(e=e.call(i);!(o=(s=e.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(a){r=!0,l=a}finally{try{!o&&e.return!=null&&e.return()}finally{if(r)throw l}}return n}}function G7(i){if(Array.isArray(i))return i}function HT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){fv(i,o,e[o])})}return i}function fv(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function U7(i,t){if(i==null)return{};var e=K7(i,t),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function K7(i,t){if(i==null)return{};var e={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(t.indexOf(o)>=0)&&(e[o]=i[o]);return e}BT("#1890ff");var Ml=function(t,e){var n,o=HT({},t,e.attrs),r=o.class,s=o.icon,l=o.spin,a=o.rotate,h=o.tabindex,d=o.twoToneColor,u=o.onClick,c=U7(o,W7),g=(n={anticon:!0},fv(n,"anticon-".concat(s.name),!!s.name),fv(n,r,r),n),f=l===""||l||s.name==="loading"?"anticon-spin":"",p=h;p===void 0&&u&&(p=-1,c.tabindex=p);var m=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,v=AT(d),C=N7(v,2),S=C[0],_=C[1];return b.createVNode("span",HT({role:"img","aria-label":s.name},c,{onClick:u,class:g}),[b.createVNode(gv,{class:f,icon:s,primaryColor:S,secondaryColor:_,style:m},null)])};Ml.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},Ml.displayName="AntdIcon",Ml.inheritAttrs=!1,Ml.getTwoToneColor=z7,Ml.setTwoToneColor=BT;const Fi=Ml;var Y7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const X7=Y7;function ET(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){q7(i,o,e[o])})}return i}function q7(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var pv=function(t,e){var n=ET({},t,e.attrs);return b.createVNode(Fi,ET({},n,{icon:X7}),null)};pv.displayName="ArrowsAltOutlined",pv.inheritAttrs=!1;const Z7=pv;var J7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const Q7=J7;function kT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){tj(i,o,e[o])})}return i}function tj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var mv=function(t,e){var n=kT({},t,e.attrs);return b.createVNode(Fi,kT({},n,{icon:Q7}),null)};mv.displayName="CaretDownOutlined",mv.inheritAttrs=!1;const ej=mv;var ij={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const nj=ij;function LT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){oj(i,o,e[o])})}return i}function oj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var vv=function(t,e){var n=LT({},t,e.attrs);return b.createVNode(Fi,LT({},n,{icon:nj}),null)};vv.displayName="CaretRightOutlined",vv.inheritAttrs=!1;const rj=vv;var sj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const lj=sj;function FT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){aj(i,o,e[o])})}return i}function aj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var bv=function(t,e){var n=FT({},t,e.attrs);return b.createVNode(Fi,FT({},n,{icon:lj}),null)};bv.displayName="DatabaseOutlined",bv.inheritAttrs=!1;const hj=bv;var dj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const uj=dj;function IT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){cj(i,o,e[o])})}return i}function cj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Cv=function(t,e){var n=IT({},t,e.attrs);return b.createVNode(Fi,IT({},n,{icon:uj}),null)};Cv.displayName="DeleteOutlined",Cv.inheritAttrs=!1;const DT=Cv;var gj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};const fj=gj;function OT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){pj(i,o,e[o])})}return i}function pj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var yv=function(t,e){var n=OT({},t,e.attrs);return b.createVNode(Fi,OT({},n,{icon:fj}),null)};yv.displayName="FilterOutlined",yv.inheritAttrs=!1;const zT=yv;var mj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"};const vj=mj;function WT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){bj(i,o,e[o])})}return i}function bj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var _v=function(t,e){var n=WT({},t,e.attrs);return b.createVNode(Fi,WT({},n,{icon:vj}),null)};_v.displayName="FormOutlined",_v.inheritAttrs=!1;const NT=_v;var Cj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M878.7 336H145.3c-18.4 0-33.3 14.3-33.3 32v464c0 17.7 14.9 32 33.3 32h733.3c18.4 0 33.3-14.3 33.3-32V368c.1-17.7-14.8-32-33.2-32zM360 792H184V632h176v160zm0-224H184V408h176v160zm240 224H424V632h176v160zm0-224H424V408h176v160zm240 224H664V632h176v160zm0-224H664V408h176v160zm64-408H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"insert-row-above",theme:"outlined"};const yj=Cj;function VT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){_j(i,o,e[o])})}return i}function _j(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var wv=function(t,e){var n=VT({},t,e.attrs);return b.createVNode(Fi,VT({},n,{icon:yj}),null)};wv.displayName="InsertRowAboveOutlined",wv.inheritAttrs=!1;const wj=wv;var Sj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M248 112h-80c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8zm584 0H368c-17.7 0-32 14.9-32 33.3v733.3c0 18.4 14.3 33.3 32 33.3h464c17.7 0 32-14.9 32-33.3V145.3c0-18.4-14.3-33.3-32-33.3zM568 840H408V664h160v176zm0-240H408V424h160v176zm0-240H408V184h160v176zm224 480H632V664h160v176zm0-240H632V424h160v176zm0-240H632V184h160v176z"}}]},name:"insert-row-left",theme:"outlined"};const xj=Sj;function jT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Rj(i,o,e[o])})}return i}function Rj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Sv=function(t,e){var n=jT({},t,e.attrs);return b.createVNode(Fi,jT({},n,{icon:xj}),null)};Sv.displayName="InsertRowLeftOutlined",Sv.inheritAttrs=!1;const Aj=Sv;var Tj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const Mj=Tj;function $T(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Bj(i,o,e[o])})}return i}function Bj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var xv=function(t,e){var n=$T({},t,e.attrs);return b.createVNode(Fi,$T({},n,{icon:Mj}),null)};xv.displayName="LoadingOutlined",xv.inheritAttrs=!1;const Pj=xv;var Hj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Ej=Hj;function GT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){kj(i,o,e[o])})}return i}function kj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Rv=function(t,e){var n=GT({},t,e.attrs);return b.createVNode(Fi,GT({},n,{icon:Ej}),null)};Rv.displayName="MinusCircleOutlined",Rv.inheritAttrs=!1;const UT=Rv;var Lj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const Fj=Lj;function KT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Ij(i,o,e[o])})}return i}function Ij(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Av=function(t,e){var n=KT({},t,e.attrs);return b.createVNode(Fi,KT({},n,{icon:Fj}),null)};Av.displayName="MinusSquareOutlined",Av.inheritAttrs=!1;const Dj=Av;var Oj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const zj=Oj;function YT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Wj(i,o,e[o])})}return i}function Wj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Tv=function(t,e){var n=YT({},t,e.attrs);return b.createVNode(Fi,YT({},n,{icon:zj}),null)};Tv.displayName="PlusCircleOutlined",Tv.inheritAttrs=!1;const XT=Tv;var Nj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Vj=Nj;function qT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){jj(i,o,e[o])})}return i}function jj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Mv=function(t,e){var n=qT({},t,e.attrs);return b.createVNode(Fi,qT({},n,{icon:Vj}),null)};Mv.displayName="SettingOutlined",Mv.inheritAttrs=!1;const $j=Mv;var Gj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"};const Uj=Gj;function ZT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Kj(i,o,e[o])})}return i}function Kj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Bv=function(t,e){var n=ZT({},t,e.attrs);return b.createVNode(Fi,ZT({},n,{icon:Uj}),null)};Bv.displayName="ShrinkOutlined",Bv.inheritAttrs=!1;const Yj=Bv;var Xj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M320 224h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-60 508h-80V292h80v440zm644-436h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-60 364h-80V364h80v296zM612 404h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8zm-60 145a3 3 0 01-3 3h-74a3 3 0 01-3-3v-74a3 3 0 013-3h74a3 3 0 013 3v74z"}}]},name:"sliders",theme:"outlined"};const qj=Xj;function JT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Zj(i,o,e[o])})}return i}function Zj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Pv=function(t,e){var n=JT({},t,e.attrs);return b.createVNode(Fi,JT({},n,{icon:qj}),null)};Pv.displayName="SlidersOutlined",Pv.inheritAttrs=!1;const Jj=Pv,yY="",Qj=b.defineComponent({name:"ConditionalItemConfig",components:{PlusCircleOutlined:XT,FormOutlined:NT,MinusCircleOutlined:UT},props:{config:{type:Array,default(){return[]}},theme:{type:String,default:"light"}},setup(i,{emit:t}){const e=b.ref("add"),n=b.ref(!1),o=b.ref(-1);b.watch(o,()=>{t("change",b.unref(o))});const r=b.ref("");function s(){e.value="add",r.value="",n.value=!0}function l(){if(b.unref(o)===-1){Ii.message.info("请选择要修改的条件项");return}e.value="edit",r.value=i.config[b.unref(o)].name,n.value=!0}function a(){if(b.unref(o)===-1){Ii.message.info("请选择要删除的条件项");return}i.config.splice(b.unref(o),1),o.value=-1}function h(){b.unref(e)==="add"?i.config.push({name:b.unref(r),conditions:[]}):i.config[b.unref(o)].name=b.unref(r),n.value=!1}const d=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":"");return b.watch(n,u=>{u&&window.modalShow&&window.modalShow(u)}),{modalType:e,visible:n,selectedIndex:o,addItem:s,name:r,handleOk:h,editItem:l,deleteItem:a,fontColor:d}}}),t$={class:"content"},e$={style:{display:"flex","align-items":"center"}},i$={class:"list"},n$=["onClick"];function o$(i,t,e,n,o,r){const s=b.resolveComponent("plus-circle-outlined"),l=b.resolveComponent("a-button"),a=b.resolveComponent("form-outlined"),h=b.resolveComponent("minus-circle-outlined"),d=b.resolveComponent("a-input"),u=b.resolveComponent("a-form-item"),c=b.resolveComponent("a-form"),g=b.resolveComponent("a-modal");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",t$,[b.createElementVNode("div",e$,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},"条件项配置",4),b.createElementVNode("div",null,[b.createVNode(l,{class:"condition-button",onClick:i.addItem},{default:b.withCtx(()=>[b.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick"]),b.createVNode(l,{class:"condition-button",onClick:i.editItem},{default:b.withCtx(()=>[b.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick"]),b.createVNode(l,{class:"condition-button",onClick:i.deleteItem},{default:b.withCtx(()=>[b.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick"])])]),b.createElementVNode("div",i$,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.config,(f,p)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["list-item",i.selectedIndex===p?"active":""]),key:p,onClick:m=>i.selectedIndex=p,style:b.normalizeStyle({color:i.fontColor})},b.toDisplayString(f.name),15,n$))),128))])]),b.createVNode(g,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=f=>i.visible=f),title:i.modalType==="add"?"添加条件项":"修改条件项","ok-text":"确认","cancel-text":"取消",destroyOnClose:!1,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(c,{name:"conditionItem"},{default:b.withCtx(()=>[b.createVNode(u,{label:"条件项名称"},{default:b.withCtx(()=>[b.createVNode(d,{value:i.name,"onUpdate:value":t[0]||(t[0]=f=>i.name=f)},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])],64)}const r$=Ti(Qj,[["render",o$],["__scopeId","data-v-629e6ec8"]]),_Y="",s$=b.defineComponent({name:"ConditionalConfig",components:{PlusCircleOutlined:XT,FormOutlined:NT,MinusCircleOutlined:UT},props:{config:{type:Array,default(){return[]}},isSelected:{type:Boolean},theme:{type:String,default:"light"}},setup(i){const t=b.ref("add"),e=b.ref(!1),n=b.ref(-1),o=b.ref({}),r=b.ref(!1),s=b.ref(),l=b.computed(()=>v=>{const C=`当前值 ${v.operation} ${v.value}`;return v.join?`${v.join} ${C}`:C});b.watch(()=>i.config,()=>{n.value=-1});const a=[{label:"与",value:"and"},{label:"或",value:"or"}],h=[{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"<="},{label:"等于",value:"=="},{label:"不等于",value:"!="}],d={operation:[{required:!0,message:"操作符不能为空"}],value:[{required:!0,message:"值不能为空"}]};function u(){t.value="add",r.value=i.config.length>0,b.unref(r)?o.value={join:"and",operation:"",value:""}:o.value={operation:"",value:""},e.value=!0}function c(){if(b.unref(n)===-1){Ii.message.info("请选择要修改的条件配置");return}t.value="edit",r.value=b.unref(n)!==0,o.value=i.config[b.unref(n)],e.value=!0}function g(){if(b.unref(n)===-1){Ii.message.info("请选择要删除的条件配置");return}i.config.splice(b.unref(n),1),n.value=-1}function f(){b.unref(s).validateFields().then(()=>{b.unref(t)==="add"?i.config.push(b.unref(o)):i.config[b.unref(n)]=b.unref(o),e.value=!1}).catch(()=>{})}const p=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":""),m=()=>document.getElementsByClassName("update-config-modal")[0]||document.body;return b.watch(e,v=>{v&&window.modalShow&&window.modalShow(v)}),{modalType:t,visible:e,selectedIndex:n,addItem:u,handleOk:f,editItem:c,deleteItem:g,operateOptions:h,formData:o,joinOptions:a,isShowJoin:r,formRules:d,formRef:s,conditionTitle:l,fontColor:p,getPopupContainer:m}}}),l$={class:"content"},a$={style:{display:"flex","align-items":"center"}},h$={class:"list"},d$=["onClick"];function u$(i,t,e,n,o,r){const s=b.resolveComponent("plus-circle-outlined"),l=b.resolveComponent("a-button"),a=b.resolveComponent("form-outlined"),h=b.resolveComponent("minus-circle-outlined"),d=b.resolveComponent("a-select"),u=b.resolveComponent("a-form-item"),c=b.resolveComponent("a-input"),g=b.resolveComponent("a-form"),f=b.resolveComponent("a-modal");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",l$,[b.createElementVNode("div",a$,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},"条件配置",4),b.createElementVNode("div",null,[b.createVNode(l,{class:"condition-button",onClick:i.addItem,disabled:!i.isSelected},{default:b.withCtx(()=>[b.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick","disabled"]),b.createVNode(l,{class:"condition-button",onClick:i.editItem,disabled:!i.isSelected},{default:b.withCtx(()=>[b.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick","disabled"]),b.createVNode(l,{class:"condition-button",onClick:i.deleteItem,disabled:!i.isSelected},{default:b.withCtx(()=>[b.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick","disabled"])])]),b.createElementVNode("div",h$,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.config,(p,m)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["list-item",i.selectedIndex===m?"active":""]),key:m,onClick:v=>i.selectedIndex=m,style:b.normalizeStyle({color:i.fontColor})},b.toDisplayString(i.conditionTitle(p)),15,d$))),128))])]),b.createVNode(f,{wrapClassName:i.theme+" update-config-modal",visible:i.visible,"onUpdate:visible":t[3]||(t[3]=p=>i.visible=p),title:i.modalType==="add"?"添加条件配置":"修改条件配置","ok-text":"确认","cancel-text":"取消",destroyOnClose:!1,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(g,{model:i.formData,rules:i.formRules,ref:"formRef"},{default:b.withCtx(()=>[i.isShowJoin?(b.openBlock(),b.createBlock(u,{key:0,label:"与上一条件关系",name:"join",required:!0},{default:b.withCtx(()=>[b.createVNode(d,{options:i.joinOptions,value:i.formData.join,"onUpdate:value":t[0]||(t[0]=p=>i.formData.join=p),getPopupContainer:i.getPopupContainer},null,8,["options","value","getPopupContainer"])]),_:1})):b.createCommentVNode("",!0),b.createVNode(u,{label:"操作符",name:"operation",required:!0},{default:b.withCtx(()=>[b.createVNode(d,{options:i.operateOptions,value:i.formData.operation,"onUpdate:value":t[1]||(t[1]=p=>i.formData.operation=p),getPopupContainer:i.getPopupContainer},null,8,["options","value","getPopupContainer"])]),_:1}),b.createVNode(u,{label:"值",name:"value",required:!0},{default:b.withCtx(()=>[b.createVNode(c,{type:"number",value:i.formData.value,"onUpdate:value":t[2]||(t[2]=p=>i.formData.value=p),style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["wrapClassName","visible","title","onOk"])],64)}const c$=Ti(s$,[["render",u$],["__scopeId","data-v-20645a9e"]]);var en="top",Dn="bottom",On="right",nn="left",Hv="auto",Mh=[en,Dn,On,nn],Bl="start",Bh="end",g$="clippingParents",QT="viewport",Ph="popper",f$="reference",tM=Mh.reduce(function(i,t){return i.concat([t+"-"+Bl,t+"-"+Bh])},[]),eM=[].concat(Mh,[Hv]).reduce(function(i,t){return i.concat([t,t+"-"+Bl,t+"-"+Bh])},[]),p$="beforeRead",m$="read",v$="afterRead",b$="beforeMain",C$="main",y$="afterMain",_$="beforeWrite",w$="write",S$="afterWrite",x$=[p$,m$,v$,b$,C$,y$,_$,w$,S$];function yo(i){return i?(i.nodeName||"").toLowerCase():null}function Cn(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function bs(i){var t=Cn(i).Element;return i instanceof t||i instanceof Element}function zn(i){var t=Cn(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Ev(i){if(typeof ShadowRoot>"u")return!1;var t=Cn(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function R$(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];!zn(r)||!yo(r)||(Object.assign(r.style,n),Object.keys(o).forEach(function(s){var l=o[s];l===!1?r.removeAttribute(s):r.setAttribute(s,l===!0?"":l)}))})}function A$(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],r=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),l=s.reduce(function(a,h){return a[h]="",a},{});!zn(o)||!yo(o)||(Object.assign(o.style,l),Object.keys(r).forEach(function(a){o.removeAttribute(a)}))})}}const T$={name:"applyStyles",enabled:!0,phase:"write",fn:R$,effect:A$,requires:["computeStyles"]};function _o(i){return i.split("-")[0]}var Cs=Math.max,Lg=Math.min,Pl=Math.round;function kv(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function iM(){return!/^((?!chrome|android).)*safari/i.test(kv())}function Hl(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=i.getBoundingClientRect(),o=1,r=1;t&&zn(i)&&(o=i.offsetWidth>0&&Pl(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&Pl(n.height)/i.offsetHeight||1);var s=bs(i)?Cn(i):window,l=s.visualViewport,a=!iM()&&e,h=(n.left+(a&&l?l.offsetLeft:0))/o,d=(n.top+(a&&l?l.offsetTop:0))/r,u=n.width/o,c=n.height/r;return{width:u,height:c,top:d,right:h+u,bottom:d+c,left:h,x:h,y:d}}function Lv(i){var t=Hl(i),e=i.offsetWidth,n=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:n}}function nM(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Ev(e)){var n=t;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function tr(i){return Cn(i).getComputedStyle(i)}function M$(i){return["table","td","th"].indexOf(yo(i))>=0}function Hr(i){return((bs(i)?i.ownerDocument:i.document)||window.document).documentElement}function Fg(i){return yo(i)==="html"?i:i.assignedSlot||i.parentNode||(Ev(i)?i.host:null)||Hr(i)}function oM(i){return!zn(i)||tr(i).position==="fixed"?null:i.offsetParent}function B$(i){var t=/firefox/i.test(kv()),e=/Trident/i.test(kv());if(e&&zn(i)){var n=tr(i);if(n.position==="fixed")return null}var o=Fg(i);for(Ev(o)&&(o=o.host);zn(o)&&["html","body"].indexOf(yo(o))<0;){var r=tr(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}function Hh(i){for(var t=Cn(i),e=oM(i);e&&M$(e)&&tr(e).position==="static";)e=oM(e);return e&&(yo(e)==="html"||yo(e)==="body"&&tr(e).position==="static")?t:e||B$(i)||t}function Fv(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Eh(i,t,e){return Cs(i,Lg(t,e))}function P$(i,t,e){var n=Eh(i,t,e);return n>e?e:n}function rM(){return{top:0,right:0,bottom:0,left:0}}function sM(i){return Object.assign({},rM(),i)}function lM(i,t){return t.reduce(function(e,n){return e[n]=i,e},{})}var H$=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,sM(typeof t!="number"?t:lM(t,Mh))};function E$(i){var t,e=i.state,n=i.name,o=i.options,r=e.elements.arrow,s=e.modifiersData.popperOffsets,l=_o(e.placement),a=Fv(l),h=[nn,On].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!s)){var u=H$(o.padding,e),c=Lv(r),g=a==="y"?en:nn,f=a==="y"?Dn:On,p=e.rects.reference[d]+e.rects.reference[a]-s[a]-e.rects.popper[d],m=s[a]-e.rects.reference[a],v=Hh(r),C=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,S=p/2-m/2,_=u[g],y=C-c[d]-u[f],w=C/2-c[d]/2+S,A=Eh(_,w,y),R=a;e.modifiersData[n]=(t={},t[R]=A,t.centerOffset=A-w,t)}}function k$(i){var t=i.state,e=i.options,n=e.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||nM(t.elements.popper,o)&&(t.elements.arrow=o))}const L$={name:"arrow",enabled:!0,phase:"main",fn:E$,effect:k$,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function El(i){return i.split("-")[1]}var F$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function I$(i,t){var e=i.x,n=i.y,o=t.devicePixelRatio||1;return{x:Pl(e*o)/o||0,y:Pl(n*o)/o||0}}function aM(i){var t,e=i.popper,n=i.popperRect,o=i.placement,r=i.variation,s=i.offsets,l=i.position,a=i.gpuAcceleration,h=i.adaptive,d=i.roundOffsets,u=i.isFixed,c=s.x,g=c===void 0?0:c,f=s.y,p=f===void 0?0:f,m=typeof d=="function"?d({x:g,y:p}):{x:g,y:p};g=m.x,p=m.y;var v=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),S=nn,_=en,y=window;if(h){var w=Hh(e),A="clientHeight",R="clientWidth";if(w===Cn(e)&&(w=Hr(e),tr(w).position!=="static"&&l==="absolute"&&(A="scrollHeight",R="scrollWidth")),w=w,o===en||(o===nn||o===On)&&r===Bh){_=Dn;var x=u&&w===y&&y.visualViewport?y.visualViewport.height:w[A];p-=x-n.height,p*=a?1:-1}if(o===nn||(o===en||o===Dn)&&r===Bh){S=On;var M=u&&w===y&&y.visualViewport?y.visualViewport.width:w[R];g-=M-n.width,g*=a?1:-1}}var T=Object.assign({position:l},h&&F$),B=d===!0?I$({x:g,y:p},Cn(e)):{x:g,y:p};if(g=B.x,p=B.y,a){var H;return Object.assign({},T,(H={},H[_]=C?"0":"",H[S]=v?"0":"",H.transform=(y.devicePixelRatio||1)<=1?"translate("+g+"px, "+p+"px)":"translate3d("+g+"px, "+p+"px, 0)",H))}return Object.assign({},T,(t={},t[_]=C?p+"px":"",t[S]=v?g+"px":"",t.transform="",t))}function D$(i){var t=i.state,e=i.options,n=e.gpuAcceleration,o=n===void 0?!0:n,r=e.adaptive,s=r===void 0?!0:r,l=e.roundOffsets,a=l===void 0?!0:l,h={placement:_o(t.placement),variation:El(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,aM(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,aM(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const O$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:D$,data:{}};var Ig={passive:!0};function z$(i){var t=i.state,e=i.instance,n=i.options,o=n.scroll,r=o===void 0?!0:o,s=n.resize,l=s===void 0?!0:s,a=Cn(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",e.update,Ig)}),l&&a.addEventListener("resize",e.update,Ig),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",e.update,Ig)}),l&&a.removeEventListener("resize",e.update,Ig)}}const W$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:z$,data:{}};var N$={left:"right",right:"left",bottom:"top",top:"bottom"};function Dg(i){return i.replace(/left|right|bottom|top/g,function(t){return N$[t]})}var V$={start:"end",end:"start"};function hM(i){return i.replace(/start|end/g,function(t){return V$[t]})}function Iv(i){var t=Cn(i),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Dv(i){return Hl(Hr(i)).left+Iv(i).scrollLeft}function j$(i,t){var e=Cn(i),n=Hr(i),o=e.visualViewport,r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;var h=iM();(h||!h&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:r,height:s,x:l+Dv(i),y:a}}function $$(i){var t,e=Hr(i),n=Iv(i),o=(t=i.ownerDocument)==null?void 0:t.body,r=Cs(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Cs(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-n.scrollLeft+Dv(i),a=-n.scrollTop;return tr(o||e).direction==="rtl"&&(l+=Cs(e.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}function Ov(i){var t=tr(i),e=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+n)}function dM(i){return["html","body","#document"].indexOf(yo(i))>=0?i.ownerDocument.body:zn(i)&&Ov(i)?i:dM(Fg(i))}function kh(i,t){var e;t===void 0&&(t=[]);var n=dM(i),o=n===((e=i.ownerDocument)==null?void 0:e.body),r=Cn(n),s=o?[r].concat(r.visualViewport||[],Ov(n)?n:[]):n,l=t.concat(s);return o?l:l.concat(kh(Fg(s)))}function zv(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function G$(i,t){var e=Hl(i,!1,t==="fixed");return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function uM(i,t,e){return t===QT?zv(j$(i,e)):bs(t)?G$(t,e):zv($$(Hr(i)))}function U$(i){var t=kh(Fg(i)),e=["absolute","fixed"].indexOf(tr(i).position)>=0,n=e&&zn(i)?Hh(i):i;return bs(n)?t.filter(function(o){return bs(o)&&nM(o,n)&&yo(o)!=="body"}):[]}function K$(i,t,e,n){var o=t==="clippingParents"?U$(i):[].concat(t),r=[].concat(o,[e]),s=r[0],l=r.reduce(function(a,h){var d=uM(i,h,n);return a.top=Cs(d.top,a.top),a.right=Lg(d.right,a.right),a.bottom=Lg(d.bottom,a.bottom),a.left=Cs(d.left,a.left),a},uM(i,s,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function cM(i){var t=i.reference,e=i.element,n=i.placement,o=n?_o(n):null,r=n?El(n):null,s=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,a;switch(o){case en:a={x:s,y:t.y-e.height};break;case Dn:a={x:s,y:t.y+t.height};break;case On:a={x:t.x+t.width,y:l};break;case nn:a={x:t.x-e.width,y:l};break;default:a={x:t.x,y:t.y}}var h=o?Fv(o):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case Bl:a[h]=a[h]-(t[d]/2-e[d]/2);break;case Bh:a[h]=a[h]+(t[d]/2-e[d]/2);break}}return a}function Lh(i,t){t===void 0&&(t={});var e=t,n=e.placement,o=n===void 0?i.placement:n,r=e.strategy,s=r===void 0?i.strategy:r,l=e.boundary,a=l===void 0?g$:l,h=e.rootBoundary,d=h===void 0?QT:h,u=e.elementContext,c=u===void 0?Ph:u,g=e.altBoundary,f=g===void 0?!1:g,p=e.padding,m=p===void 0?0:p,v=sM(typeof m!="number"?m:lM(m,Mh)),C=c===Ph?f$:Ph,S=i.rects.popper,_=i.elements[f?C:c],y=K$(bs(_)?_:_.contextElement||Hr(i.elements.popper),a,d,s),w=Hl(i.elements.reference),A=cM({reference:w,element:S,strategy:"absolute",placement:o}),R=zv(Object.assign({},S,A)),x=c===Ph?R:w,M={top:y.top-x.top+v.top,bottom:x.bottom-y.bottom+v.bottom,left:y.left-x.left+v.left,right:x.right-y.right+v.right},T=i.modifiersData.offset;if(c===Ph&&T){var B=T[o];Object.keys(M).forEach(function(H){var k=[On,Dn].indexOf(H)>=0?1:-1,P=[en,Dn].indexOf(H)>=0?"y":"x";M[H]+=B[P]*k})}return M}function Y$(i,t){t===void 0&&(t={});var e=t,n=e.placement,o=e.boundary,r=e.rootBoundary,s=e.padding,l=e.flipVariations,a=e.allowedAutoPlacements,h=a===void 0?eM:a,d=El(n),u=d?l?tM:tM.filter(function(f){return El(f)===d}):Mh,c=u.filter(function(f){return h.indexOf(f)>=0});c.length===0&&(c=u);var g=c.reduce(function(f,p){return f[p]=Lh(i,{placement:p,boundary:o,rootBoundary:r,padding:s})[_o(p)],f},{});return Object.keys(g).sort(function(f,p){return g[f]-g[p]})}function X$(i){if(_o(i)===Hv)return[];var t=Dg(i);return[hM(i),t,hM(t)]}function q$(i){var t=i.state,e=i.options,n=i.name;if(!t.modifiersData[n]._skip){for(var o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,l=s===void 0?!0:s,a=e.fallbackPlacements,h=e.padding,d=e.boundary,u=e.rootBoundary,c=e.altBoundary,g=e.flipVariations,f=g===void 0?!0:g,p=e.allowedAutoPlacements,m=t.options.placement,v=_o(m),C=v===m,S=a||(C||!f?[Dg(m)]:X$(m)),_=[m].concat(S).reduce(function(j,$){return j.concat(_o($)===Hv?Y$(t,{placement:$,boundary:d,rootBoundary:u,padding:h,flipVariations:f,allowedAutoPlacements:p}):$)},[]),y=t.rects.reference,w=t.rects.popper,A=new Map,R=!0,x=_[0],M=0;M<_.length;M++){var T=_[M],B=_o(T),H=El(T)===Bl,k=[en,Dn].indexOf(B)>=0,P=k?"width":"height",E=Lh(t,{placement:T,boundary:d,rootBoundary:u,altBoundary:c,padding:h}),F=k?H?On:nn:H?Dn:en;y[P]>w[P]&&(F=Dg(F));var I=Dg(F),L=[];if(r&&L.push(E[B]<=0),l&&L.push(E[F]<=0,E[I]<=0),L.every(function(j){return j})){x=T,R=!1;break}A.set(T,L)}if(R)for(var D=f?3:1,O=function($){var X=_.find(function(K){var U=A.get(K);if(U)return U.slice(0,$).every(function(Q){return Q})});if(X)return x=X,"break"},V=D;V>0;V--){var W=O(V);if(W==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}const Z$={name:"flip",enabled:!0,phase:"main",fn:q$,requiresIfExists:["offset"],data:{_skip:!1}};function gM(i,t,e){return e===void 0&&(e={x:0,y:0}),{top:i.top-t.height-e.y,right:i.right-t.width+e.x,bottom:i.bottom-t.height+e.y,left:i.left-t.width-e.x}}function fM(i){return[en,On,Dn,nn].some(function(t){return i[t]>=0})}function J$(i){var t=i.state,e=i.name,n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,s=Lh(t,{elementContext:"reference"}),l=Lh(t,{altBoundary:!0}),a=gM(s,n),h=gM(l,o,r),d=fM(a),u=fM(h);t.modifiersData[e]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const Q$={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:J$};function tG(i,t,e){var n=_o(i),o=[nn,en].indexOf(n)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,s=r[0],l=r[1];return s=s||0,l=(l||0)*o,[nn,On].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function eG(i){var t=i.state,e=i.options,n=i.name,o=e.offset,r=o===void 0?[0,0]:o,s=eM.reduce(function(d,u){return d[u]=tG(u,t.rects,r),d},{}),l=s[t.placement],a=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=h),t.modifiersData[n]=s}const iG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eG};function nG(i){var t=i.state,e=i.name;t.modifiersData[e]=cM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oG={name:"popperOffsets",enabled:!0,phase:"read",fn:nG,data:{}};function rG(i){return i==="x"?"y":"x"}function sG(i){var t=i.state,e=i.options,n=i.name,o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,l=s===void 0?!1:s,a=e.boundary,h=e.rootBoundary,d=e.altBoundary,u=e.padding,c=e.tether,g=c===void 0?!0:c,f=e.tetherOffset,p=f===void 0?0:f,m=Lh(t,{boundary:a,rootBoundary:h,padding:u,altBoundary:d}),v=_o(t.placement),C=El(t.placement),S=!C,_=Fv(v),y=rG(_),w=t.modifiersData.popperOffsets,A=t.rects.reference,R=t.rects.popper,x=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,M=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(w){if(r){var H,k=_==="y"?en:nn,P=_==="y"?Dn:On,E=_==="y"?"height":"width",F=w[_],I=F+m[k],L=F-m[P],D=g?-R[E]/2:0,O=C===Bl?A[E]:R[E],V=C===Bl?-R[E]:-A[E],W=t.elements.arrow,j=g&&W?Lv(W):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rM(),X=$[k],K=$[P],U=Eh(0,A[E],j[E]),Q=S?A[E]/2-D-U-X-M.mainAxis:O-U-X-M.mainAxis,dt=S?-A[E]/2+D+U+K+M.mainAxis:V+U+K+M.mainAxis,pt=t.elements.arrow&&Hh(t.elements.arrow),xt=pt?_==="y"?pt.clientTop||0:pt.clientLeft||0:0,G=(H=T==null?void 0:T[_])!=null?H:0,q=F+Q-G-xt,ot=F+dt-G,ct=Eh(g?Lg(I,q):I,F,g?Cs(L,ot):L);w[_]=ct,B[_]=ct-F}if(l){var _t,yt=_==="x"?en:nn,ht=_==="x"?Dn:On,et=w[y],mt=y==="y"?"height":"width",st=et+m[yt],Ft=et-m[ht],Ht=[en,nn].indexOf(v)!==-1,vt=(_t=T==null?void 0:T[y])!=null?_t:0,Pt=Ht?st:et-A[mt]-R[mt]-vt+M.altAxis,_e=Ht?et+A[mt]+R[mt]-vt-M.altAxis:Ft,ge=g&&Ht?P$(Pt,et,_e):Eh(g?Pt:st,et,g?_e:Ft);w[y]=ge,B[y]=ge-et}t.modifiersData[n]=B}}const lG={name:"preventOverflow",enabled:!0,phase:"main",fn:sG,requiresIfExists:["offset"]};function aG(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function hG(i){return i===Cn(i)||!zn(i)?Iv(i):aG(i)}function dG(i){var t=i.getBoundingClientRect(),e=Pl(t.width)/i.offsetWidth||1,n=Pl(t.height)/i.offsetHeight||1;return e!==1||n!==1}function uG(i,t,e){e===void 0&&(e=!1);var n=zn(t),o=zn(t)&&dG(t),r=Hr(t),s=Hl(i,o,e),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!e)&&((yo(t)!=="body"||Ov(r))&&(l=hG(t)),zn(t)?(a=Hl(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):r&&(a.x=Dv(r))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function cG(i){var t=new Map,e=new Set,n=[];i.forEach(function(r){t.set(r.name,r)});function o(r){e.add(r.name);var s=[].concat(r.requires||[],r.requiresIfExists||[]);s.forEach(function(l){if(!e.has(l)){var a=t.get(l);a&&o(a)}}),n.push(r)}return i.forEach(function(r){e.has(r.name)||o(r)}),n}function gG(i){var t=cG(i);return x$.reduce(function(e,n){return e.concat(t.filter(function(o){return o.phase===n}))},[])}function fG(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function pG(i){var t=i.reduce(function(e,n){var o=e[n.name];return e[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var pM={placement:"bottom",modifiers:[],strategy:"absolute"};function mM(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function mG(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,n=e===void 0?[]:e,o=t.defaultOptions,r=o===void 0?pM:o;return function(l,a,h){h===void 0&&(h=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},pM,r),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},u=[],c=!1,g={state:d,setOptions:function(v){var C=typeof v=="function"?v(d.options):v;p(),d.options=Object.assign({},r,d.options,C),d.scrollParents={reference:bs(l)?kh(l):l.contextElement?kh(l.contextElement):[],popper:kh(a)};var S=gG(pG([].concat(n,d.options.modifiers)));return d.orderedModifiers=S.filter(function(_){return _.enabled}),f(),g.update()},forceUpdate:function(){if(!c){var v=d.elements,C=v.reference,S=v.popper;if(mM(C,S)){d.rects={reference:uG(C,Hh(S),d.options.strategy==="fixed"),popper:Lv(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(M){return d.modifiersData[M.name]=Object.assign({},M.data)});for(var _=0;_<d.orderedModifiers.length;_++){if(d.reset===!0){d.reset=!1,_=-1;continue}var y=d.orderedModifiers[_],w=y.fn,A=y.options,R=A===void 0?{}:A,x=y.name;typeof w=="function"&&(d=w({state:d,options:R,name:x,instance:g})||d)}}}},update:fG(function(){return new Promise(function(m){g.forceUpdate(),m(d)})}),destroy:function(){p(),c=!0}};if(!mM(l,a))return g;g.setOptions(h).then(function(m){!c&&h.onFirstUpdate&&h.onFirstUpdate(m)});function f(){d.orderedModifiers.forEach(function(m){var v=m.name,C=m.options,S=C===void 0?{}:C,_=m.effect;if(typeof _=="function"){var y=_({state:d,name:v,instance:g,options:S}),w=function(){};u.push(y||w)}})}function p(){u.forEach(function(m){return m()}),u=[]}return g}}var vG=[W$,oG,O$,T$,iG,Z$,lG,L$,Q$],bG=mG({defaultModifiers:vG});function Wv(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=Array(t);e<t;e++)n[e]=i[e];return n}function vM(i,t){if(i){if(typeof i=="string")return Wv(i,t);var e={}.toString.call(i).slice(8,-1);return e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set"?Array.from(i):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Wv(i,t):void 0}}function CG(i){return function(t){if(Array.isArray(t))return Wv(t)}(i)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(i)||vM(i)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
366
366
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kl(i){return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(i)}function bM(i,t,e,n,o,r,s){try{var l=i[r](s),a=l.value}catch(h){return void e(h)}l.done?t(a):Promise.resolve(a).then(n,o)}function CM(i){return function(){var t=this,e=arguments;return new Promise(function(n,o){var r=i.apply(t,e);function s(a){bM(r,n,o,s,l,"next",a)}function l(a){bM(r,n,o,s,l,"throw",a)}s(void 0)})}}var yM={exports:{}},_M={exports:{}};(function(i){function t(e){return i.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i.exports.__esModule=!0,i.exports.default=i.exports,t(e)}i.exports=t,i.exports.__esModule=!0,i.exports.default=i.exports})(_M),function(i){var t=_M.exports.default;function e(){i.exports=e=function(){return o},i.exports.__esModule=!0,i.exports.default=i.exports;var n,o={},r=Object.prototype,s=r.hasOwnProperty,l=Object.defineProperty||function(L,D,O){L[D]=O.value},a=typeof Symbol=="function"?Symbol:{},h=a.iterator||"@@iterator",d=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(L,D,O){return Object.defineProperty(L,D,{value:O,enumerable:!0,configurable:!0,writable:!0}),L[D]}try{c({},"")}catch{c=function(D,O,V){return D[O]=V}}function g(L,D,O,V){var W=D&&D.prototype instanceof _?D:_,j=Object.create(W.prototype),$=new F(V||[]);return l(j,"_invoke",{value:H(L,O,$)}),j}function f(L,D,O){try{return{type:"normal",arg:L.call(D,O)}}catch(V){return{type:"throw",arg:V}}}o.wrap=g;var p="suspendedStart",m="suspendedYield",v="executing",C="completed",S={};function _(){}function y(){}function w(){}var A={};c(A,h,function(){return this});var R=Object.getPrototypeOf,x=R&&R(R(I([])));x&&x!==r&&s.call(x,h)&&(A=x);var M=w.prototype=_.prototype=Object.create(A);function T(L){["next","throw","return"].forEach(function(D){c(L,D,function(O){return this._invoke(D,O)})})}function B(L,D){function O(W,j,$,X){var K=f(L[W],L,j);if(K.type!=="throw"){var U=K.arg,Q=U.value;return Q&&t(Q)=="object"&&s.call(Q,"__await")?D.resolve(Q.__await).then(function(dt){O("next",dt,$,X)},function(dt){O("throw",dt,$,X)}):D.resolve(Q).then(function(dt){U.value=dt,$(U)},function(dt){return O("throw",dt,$,X)})}X(K.arg)}var V;l(this,"_invoke",{value:function(W,j){function $(){return new D(function(X,K){O(W,j,X,K)})}return V=V?V.then($,$):$()}})}function H(L,D,O){var V=p;return function(W,j){if(V===v)throw Error("Generator is already running");if(V===C){if(W==="throw")throw j;return{value:n,done:!0}}for(O.method=W,O.arg=j;;){var $=O.delegate;if($){var X=k($,O);if(X){if(X===S)continue;return X}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(V===p)throw V=C,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);V=v;var K=f(L,D,O);if(K.type==="normal"){if(V=O.done?C:m,K.arg===S)continue;return{value:K.arg,done:O.done}}K.type==="throw"&&(V=C,O.method="throw",O.arg=K.arg)}}}function k(L,D){var O=D.method,V=L.iterator[O];if(V===n)return D.delegate=null,O==="throw"&&L.iterator.return&&(D.method="return",D.arg=n,k(L,D),D.method==="throw")||O!=="return"&&(D.method="throw",D.arg=new TypeError("The iterator does not provide a '"+O+"' method")),S;var W=f(V,L.iterator,D.arg);if(W.type==="throw")return D.method="throw",D.arg=W.arg,D.delegate=null,S;var j=W.arg;return j?j.done?(D[L.resultName]=j.value,D.next=L.nextLoc,D.method!=="return"&&(D.method="next",D.arg=n),D.delegate=null,S):j:(D.method="throw",D.arg=new TypeError("iterator result is not an object"),D.delegate=null,S)}function P(L){var D={tryLoc:L[0]};1 in L&&(D.catchLoc=L[1]),2 in L&&(D.finallyLoc=L[2],D.afterLoc=L[3]),this.tryEntries.push(D)}function E(L){var D=L.completion||{};D.type="normal",delete D.arg,L.completion=D}function F(L){this.tryEntries=[{tryLoc:"root"}],L.forEach(P,this),this.reset(!0)}function I(L){if(L||L===""){var D=L[h];if(D)return D.call(L);if(typeof L.next=="function")return L;if(!isNaN(L.length)){var O=-1,V=function W(){for(;++O<L.length;)if(s.call(L,O))return W.value=L[O],W.done=!1,W;return W.value=n,W.done=!0,W};return V.next=V}}throw new TypeError(t(L)+" is not iterable")}return y.prototype=w,l(M,"constructor",{value:w,configurable:!0}),l(w,"constructor",{value:y,configurable:!0}),y.displayName=c(w,u,"GeneratorFunction"),o.isGeneratorFunction=function(L){var D=typeof L=="function"&&L.constructor;return!!D&&(D===y||(D.displayName||D.name)==="GeneratorFunction")},o.mark=function(L){return Object.setPrototypeOf?Object.setPrototypeOf(L,w):(L.__proto__=w,c(L,u,"GeneratorFunction")),L.prototype=Object.create(M),L},o.awrap=function(L){return{__await:L}},T(B.prototype),c(B.prototype,d,function(){return this}),o.AsyncIterator=B,o.async=function(L,D,O,V,W){W===void 0&&(W=Promise);var j=new B(g(L,D,O,V),W);return o.isGeneratorFunction(D)?j:j.next().then(function($){return $.done?$.value:j.next()})},T(M),c(M,u,"Generator"),c(M,h,function(){return this}),c(M,"toString",function(){return"[object Generator]"}),o.keys=function(L){var D=Object(L),O=[];for(var V in D)O.push(V);return O.reverse(),function W(){for(;O.length;){var j=O.pop();if(j in D)return W.value=j,W.done=!1,W}return W.done=!0,W}},o.values=I,F.prototype={constructor:F,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!L)for(var D in this)D.charAt(0)==="t"&&s.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=n)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var D=this;function O(K,U){return j.type="throw",j.arg=L,D.next=K,U&&(D.method="next",D.arg=n),!!U}for(var V=this.tryEntries.length-1;V>=0;--V){var W=this.tryEntries[V],j=W.completion;if(W.tryLoc==="root")return O("end");if(W.tryLoc<=this.prev){var $=s.call(W,"catchLoc"),X=s.call(W,"finallyLoc");if($&&X){if(this.prev<W.catchLoc)return O(W.catchLoc,!0);if(this.prev<W.finallyLoc)return O(W.finallyLoc)}else if($){if(this.prev<W.catchLoc)return O(W.catchLoc,!0)}else{if(!X)throw Error("try statement without catch or finally");if(this.prev<W.finallyLoc)return O(W.finallyLoc)}}}},abrupt:function(L,D){for(var O=this.tryEntries.length-1;O>=0;--O){var V=this.tryEntries[O];if(V.tryLoc<=this.prev&&s.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var W=V;break}}W&&(L==="break"||L==="continue")&&W.tryLoc<=D&&D<=W.finallyLoc&&(W=null);var j=W?W.completion:{};return j.type=L,j.arg=D,W?(this.method="next",this.next=W.finallyLoc,S):this.complete(j)},complete:function(L,D){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&D&&(this.next=D),S},finish:function(L){for(var D=this.tryEntries.length-1;D>=0;--D){var O=this.tryEntries[D];if(O.finallyLoc===L)return this.complete(O.completion,O.afterLoc),E(O),S}},catch:function(L){for(var D=this.tryEntries.length-1;D>=0;--D){var O=this.tryEntries[D];if(O.tryLoc===L){var V=O.completion;if(V.type==="throw"){var W=V.arg;E(O)}return W}}throw Error("illegal catch attempt")},delegateYield:function(L,D,O){return this.delegate={iterator:I(L),resultName:D,nextLoc:O},this.method==="next"&&(this.arg=n),S}},o}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports}(yM);var Og=yM.exports(),zg=Og;try{regeneratorRuntime=Og}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Og:Function("r","regeneratorRuntime = r")(Og)}function Ll(i,t){return function(e){if(Array.isArray(e))return e}(i)||function(e,n){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r,s,l,a,h=[],d=!0,u=!1;try{if(l=(o=o.call(e)).next,n===0){if(Object(o)!==o)return;d=!1}else for(;!(d=(r=l.call(o)).done)&&(h.push(r.value),h.length!==n);d=!0);}catch(c){u=!0,s=c}finally{try{if(!d&&o.return!=null&&(a=o.return(),Object(a)!==a))return}finally{if(u)throw s}}return h}}(i,t)||vM(i,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
367
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yG(i){var t=function(e,n){if(kl(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n||"default");if(kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return kl(t)=="symbol"?t:t+""}function Nv(i,t,e){return(t=yG(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Wg=b.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=b.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),background:"hsl(".concat(i.hue,", 100%, 50%)")}});return{saturationStyle:n,sliderStyle:b.computed(function(){return{top:"".concat((100-i.value)/100*i.size-5,"px"),left:"".concat(i.saturation*i.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(o){var r=o.target.getBoundingClientRect(),s=r.left,l=r.top,a=function(d){var u=d.clientX,c=d.clientY,g=u-s,f=c-l;g<0&&(g=0),f<0&&(f=0),g>i.size&&(g=i.size),f>i.size&&(f=i.size);var p=g/i.size*100,m=100-f/i.size*100;e("change",p,m)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(o),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}});function wo(i,t){t===void 0&&(t={});var e=t.insertAt;if(i&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}wo(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Wg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"saturation",style:b.normalizeStyle(i.saturationStyle),onMousedown:t[0]||(t[0]=b.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[t[1]||(t[1]=b.createElementVNode("div",{class:"saturation-white"},null,-1)),t[2]||(t[2]=b.createElementVNode("div",{class:"saturation-black"},null,-1)),b.createElementVNode("div",{class:"slider",style:b.normalizeStyle(i.sliderStyle)},null,4)],36)},Wg.__scopeId="data-v-24517fec",Wg.__file="src/picker/Saturation.vue";var Ng=b.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=b.computed(function(){return{top:"".concat((1-i.hue/360)*i.height-2,"px"),height:"".concat(4,"px")}}),o=b.ref();return b.onMounted(function(){(function(){o.value.width=i.width,o.value.height=i.height;var r=o.value.getContext("2d"),s=r.createLinearGradient(0,0,0,i.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),r.fillStyle=s,r.fillRect(0,0,i.width,i.height)})()}),{canvas:o,sliderStyle:n,onSelect:function(r){var s=r.target.getBoundingClientRect().top,l=function(h){var d=h.clientY-s;d<0&&(d=0),d>i.height&&(d=i.height);var u=-100*d/i.height+100;e("change",360*u/100)},a=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a)}}}}),_G={ref:"canvas"};wo(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Ng.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"hue",onMousedown:t[0]||(t[0]=b.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[b.createElementVNode("canvas",_G,null,512),b.createElementVNode("div",{class:"slider",style:b.normalizeStyle(i.sliderStyle)},null,4)],32)},Ng.__scopeId="data-v-78b9f4f0",Ng.__file="src/picker/Hue.vue";var Vg=b.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(i,t){var e=t.emit,n=b.computed(function(){return{top:"".concat(i.alpha*i.height-2,"px"),height:"".concat(4,"px")}}),o=b.ref(),r=function(){var s=o.value.getContext("2d");o.value.width=i.width,o.value.height=i.height;var l=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);s.fillStyle=s.createPattern(l,"repeat"),s.fillRect(0,0,i.width,i.height);var a=s.createLinearGradient(0,0,0,i.height);a.addColorStop(.01,"rgba(255,255,255,0)"),a.addColorStop(.99,i.color),s.fillStyle=a,s.fillRect(0,0,i.width,i.height)};return b.watch(function(){return i.color},function(){r()}),b.onMounted(function(){r()}),{canvas:o,sliderStyle:n,onSelect:function(s){var l=s.target.getBoundingClientRect().top,a=function(d){var u=d.clientY-l;u<0&&(u=0),u>i.height&&(u=i.height);var c=parseFloat((u/i.height).toFixed(2));e("change",c)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(s),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}}),wG={ref:"canvas"};wo(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Vg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"alpha",onMousedown:t[0]||(t[0]=b.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[b.createElementVNode("canvas",wG,null,512),b.createElementVNode("div",{class:"slider",style:b.normalizeStyle(i.sliderStyle)},null,4)],32)},Vg.__scopeId="data-v-24dc9656",Vg.__file="src/picker/Alpha.vue";var wM={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},SM={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},SG={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function xM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Vv(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(e),!0).forEach(function(n){Nv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):xM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}var ys=null,RM=function(i,t,e){var n=b.ref({}),o=e||{},r=o.placement,s=o.defaultStyle,l={strategy:o.strategy||"absolute",placement:r||"auto",onFirstUpdate:function(){ys.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(a){var h=a.state,d=h.styles,u=h.placement,c=d.popper;n.value=Vv(Vv(Vv({},c),s),{},{transformOrigin:u==="top"?"center bottom":"center top"})}}]};return b.watch(function(){return[b.unref(i),b.unref(t)]},function(a,h){var d,u=Ll(a,2),c=u[0],g=u[1],f=Ll(h,2),p=f[0],m=f[1];if(c&&g&&(p!==c||m!==p)){(d=ys)===null||d===void 0||d.destroy();var v=c.$el||c,C=g.$el||g;b.nextTick(function(){ys=bG(v,C,l)})}}),b.onBeforeUnmount(function(){var a;ys&&((a=ys)===null||a===void 0||a.destroy(),ys=null)}),{instance:ys,style:n}},jg=b.defineComponent({props:{value:{type:String,default:"RGBA"},showAlpha:{type:Boolean},options:{type:[Boolean,Array]}},emits:["change"],setup:function(i,t){var e=t.emit,n=b.ref(null),o=b.ref(null),r=b.ref(!1),s=RM(n,o,{strategy:"fixed",defaultStyle:{zIndex:2}}).style,l=b.computed(function(){return Array.isArray(i.options)&&i.options.length>1}),a=b.computed(function(){var d=i.options,u=i.showAlpha,c=i.value;return Array.isArray(d)?u?d.map(function(g){return wM[g]}).filter(function(g){return!g.includes(c)}):d.map(function(g){return SM[g]}).filter(function(g){return!g.includes(c)}):[]}),h=function(d){var u,c,g=d.target;!((u=b.unref(n))!==null&&u!==void 0&&u.isEqualNode(g))&&(!((c=b.unref(n))===null||c===void 0)&&c.contains(g))||(r.value=!1)};return b.onMounted(function(){document.addEventListener("mouseup",h,!1)}),b.onUnmounted(function(){document.removeEventListener("mouseup",h,!1)}),{targetRef:n,selectorRef:o,selectorStyle:s,isShowSelector:r,isNeedSelect:l,formatOptions:a,onShow:function(){l.value&&(r.value=!0)},onFormatChange:function(d){e("change",SG[d])}}}}),xG={class:"format"},RG={key:0,class:"arrow"},AG=["onClick"];wo(".format[data-v-5f6e8f5e]{position:relative}.label[data-v-5f6e8f5e]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;position:relative;width:60px}[pick-colors-theme=dark] .label[data-v-5f6e8f5e]{background:#252930;color:#999}.arrow[data-v-5f6e8f5e]{height:6px;margin-bottom:4px;margin-left:5px;transform:rotate(135deg);width:6px}.arrow[data-v-5f6e8f5e],[pick-colors-theme=dark] .arrow[data-v-5f6e8f5e]{border-right:1px solid #999;border-top:1px solid #999}.selector[data-v-5f6e8f5e]{align-items:center;background:#f7f8f9;border-radius:5px;box-shadow:0 0 16px 0 rgba(0,0,0,.16);cursor:pointer;display:flex;flex-direction:column;font-weight:400;justify-content:center;padding:4px}[pick-colors-theme=dark] .selector[data-v-5f6e8f5e]{background:#252930;color:#999}.selector-item[data-v-5f6e8f5e]{align-items:center;display:flex;height:30px;justify-content:center;width:60px}.selector-item[data-v-5f6e8f5e]:hover{background:#e1f2fe}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]{color:#fff}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]:hover{background:#0087fa}.active-selector-item[data-v-5f6e8f5e]{background:#e1f2fe}[pick-colors-theme=dark] .active-selector-item[data-v-5f6e8f5e]{background:#0087fa}.v-enter-active[data-v-5f6e8f5e],.v-leave-active[data-v-5f6e8f5e]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-5f6e8f5e],.v-leave-to[data-v-5f6e8f5e]{opacity:0;transform:scaleY(0)}"),jg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",xG,[b.createElementVNode("div",{class:"label",ref:"targetRef",onClick:t[0]||(t[0]=function(){return i.onShow&&i.onShow.apply(i,arguments)})},[b.createElementVNode("span",null,b.toDisplayString(i.value),1),i.isNeedSelect?(b.openBlock(),b.createElementBlock("div",RG)):b.createCommentVNode("v-if",!0)],512),b.createVNode(b.Transition,null,{default:b.withCtx(function(){return[i.isShowSelector?(b.openBlock(),b.createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:b.normalizeStyle(i.selectorStyle)},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.formatOptions,function(s){return b.openBlock(),b.createElementBlock("div",{class:"selector-item",key:s,onClick:function(l){return i.onFormatChange(s)}},b.toDisplayString(s),9,AG)}),128))],4)):b.createCommentVNode("v-if",!0)]}),_:1})])},jg.__scopeId="data-v-5f6e8f5e",jg.__file="src/picker/input-value/FormatValue.vue";var $g=b.defineComponent({name:"Input",components:{FormatValue:jg},props:{format:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number},showAlpha:{type:Boolean},formatOptions:{type:[Boolean,Array]}},emits:["change","focus","blur","enter","formatChange"],setup:function(i,t){var e=t.emit;return{onInput:function(n){var o;e("change",(o=n.target)===null||o===void 0?void 0:o.value)},valueStyle:b.computed(function(){return{minWidth:"".concat(i.width,"px"),maxWidth:"".concat(i.width,"px"),width:"".concat(i.width,"px")}}),onFocus:function(){e("focus")},onBlur:function(){e("blur")},onEnter:function(){e("enter")},onFormatChange:function(n){e("formatChange",n)}}}}),TG={class:"input"},MG=[".value"];function AM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Wn(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?AM(Object(e),!0).forEach(function(n){Nv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):AM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}wo(".input[data-v-2c454c00]{display:flex;font-size:12px}.value[data-v-2c454c00]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-2c454c00]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-2c454c00]:focus{border:1px solid #1890ff;outline:none}"),$g.render=function(i,t,e,n,o,r){var s=b.resolveComponent("FormatValue");return b.openBlock(),b.createElementBlock("div",TG,[b.createVNode(s,{value:i.format,showAlpha:i.showAlpha,options:i.formatOptions,onChange:i.onFormatChange},null,8,["value","showAlpha","options","onChange"]),b.createElementVNode("input",{class:"value",style:b.normalizeStyle(i.valueStyle),".value":i.value,onFocus:t[0]||(t[0]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onInput:t[1]||(t[1]=function(){return i.onInput&&i.onInput.apply(i,arguments)}),onBlur:t[2]||(t[2]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onKeydown:t[3]||(t[3]=b.withKeys(function(){return i.onEnter&&i.onEnter.apply(i,arguments)},["enter"]))},null,44,MG)])},$g.__scopeId="data-v-2c454c00",$g.__file="src/picker/input-value/InputValue.vue";var TM=function(i,t,e){return[i,t*e/((i=(2-t)*e)<1?i:2-i)||0,i/2]},MM={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Gg=function(i){i=Math.min(Math.round(i),255);var t=Math.floor(i/16),e=i%16;return"".concat(MM[t]||t).concat(MM[e]||e)},BM=function(i){var t=i.r,e=i.g,n=i.b;return isNaN(t)||isNaN(e)||isNaN(n)?"":"#".concat(Gg(t)).concat(Gg(e)).concat(Gg(n))},Fl=function(i,t){var e;typeof(e=i)=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1&&(i="100%");var n=function(o){return typeof o=="string"&&o.indexOf("%")!==-1}(i);return i=Math.min(t,Math.max(0,parseFloat("".concat(i)))),n&&(i=parseInt("".concat(i*t),10)/100),Math.abs(i-t)<1e-6?1:i%t/parseFloat(t)},Fh=function(i,t,e){i=6*Fl(i,360),t=Fl(t,100),e=Fl(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:Math.round(255*h),g:Math.round(255*d),b:Math.round(255*u)}},PM=function(i,t,e){var n,o,r=i.h,s=i.s,l=i.v,a=i.a;if(e)switch(a=(o=(n=a).toString().match(/\.(\d{1,2})(\d*)/))&&o[2].length>0?parseFloat(n.toFixed(2)):n,t){case"hsl":var h=TM(r,s/100,l/100);return"hsla(".concat(r.toFixed(0),", ").concat(Math.round(100*h[1]),"%, ").concat(Math.round(100*h[2]),"%, ").concat(a,")");case"hsv":return"hsva(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%, ").concat(a,")");case"rgb":var d=Fh(r,s,l),u=d.r,c=d.g,g=d.b;return"rgba(".concat(u,", ").concat(c,", ").concat(g,", ").concat(a,")");default:return"".concat(BM(Fh(r,s,l))).concat(Gg(255*a))}else switch(t){case"hsl":var f=TM(r,s/100,l/100);return"hsl(".concat(r.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%)");case"rgb":var p=Fh(r,s,l),m=p.r,v=p.g,C=p.b;return"rgb(".concat(m,", ").concat(v,", ").concat(C,")");default:return BM(Fh(r,s,l))}},Ug=function(i){var t=i.r,e=i.g,n=i.b;t=Fl(t,255),e=Fl(e,255),n=Fl(n,255);var o,r=Math.max(t,e,n),s=Math.min(t,e,n),l=r,a=r-s,h=r===0?0:a/r;if(r===s)o=0;else{switch(r){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4}o/=6}return{h:360*o,s:100*h,v:100*l}},HM=function(i){var t=i.h,e=i.s,n=i.l;n/=100;var o=e/=100,r=Math.max(n,.01);return e*=(n*=2)<=1?n:2-n,o*=r<=1?r:2-r,{h:+t,s:100*(n===0?2*o/(r+o):2*e/(n+e)),v:100*((n+e)/2)}},EM=function(i){var t=[];if(i.match(/^#([0-9a-fA-f]{3,4})$/g))for(var e=1;e<i.length;e++)t.push(parseInt("0x"+i[e].repeat(2)));else if(i.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var n=1;n<i.length;n+=2)t.push(parseInt("0x"+i.slice(n,n+2)));return{r:t[0],g:t[1],b:t[2],a:t[3]}},jv=function(i,t,e){if(typeof i=="string"&&i!==""){var n=Kg(i,Yg(i),e),o=IM(n);return o==null?"":PM(o,t,e)}return""},kM=function(i){var t=Ll(i.match(/(\d(\.\d+)?)+/g),4);return{r:t[0],g:t[1],b:t[2],a:t[3]}},LM=function(i){var t=Ll(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:e,s:parseFloat(n),l:parseFloat(o),a:r}},FM=function(i){var t=Ll(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:parseFloat(e),s:parseFloat(n),v:parseFloat(o),a:parseFloat(r)}},Kg=function(i,t){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(t){case"rgb":var e=kM(i),n=e.r,o=e.g,r=e.b,s=e.a;return Wn(Wn({},Ug({r:n,g:o,b:r})),{},{a:+s});case"hsv":var l=FM(i);return{h:l.h,s:l.s,v:l.v,a:l.a};case"hsl":var a=LM(i),h=a.h,d=a.s,u=a.l,c=a.a;return Wn(Wn({},HM({h,s:d,l:u})),{},{a:+c});default:var g=EM(i),f=g.r,p=g.g,m=g.b,v=g.a;return Wn(Wn({},Ug({r:f,g:p,b:m})),{},{a:v/255})}else switch(t){case"rgb":return Wn(Wn({},Ug(kM(i))),{},{a:1});case"hsv":var C=FM(i);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return Wn(Wn({},HM(LM(i))),{},{a:1});default:return Wn(Wn({},Ug(EM(i))),{},{a:1})}},Yg=function(i){return i.match(/^#/)?"hex":i.match(/^rgb/)?"rgb":i.match(/^hsl/)?"hsl":i.match(/^hsv/)?"hsv":"hex"},IM=function(i){var t=i.h,e=i.s,n=i.v,o=i.a;return isNaN(t)&&isNaN(e)&&isNaN(n)?null:(isNaN(t)&&(t=0),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(o)&&(o=1),{h:t,s:e,v:n,a:o})},Ih=b.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(i){var t=b.ref(),e=b.inject("theme",{theme:"light"}).theme,n=b.computed(function(){return parseFloat((i.width||i.size)+"")}),o=b.computed(function(){return parseFloat((i.height||i.size)+"")}),r=b.computed(function(){return{width:"".concat(b.unref(n),"px"),height:"".concat(b.unref(o),"px"),border:i.border?"1px solid ".concat(b.unref(e)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(i.borderRadius,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(b.unref(e)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var l=t.value.getContext("2d");t.value.width=b.unref(n),t.value.height=b.unref(o);var a=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);l.fillStyle=l.createPattern(a,"repeat"),l.fillRect(0,0,b.unref(n),b.unref(o)),l.fillStyle=i.value,l.fillRect(0,0,b.unref(n),b.unref(o))};return b.watch(function(){return i.value},function(){s()}),b.onMounted(function(){s()}),{canvas:t,colorItemStyle:r}}}),BG=["draggable"];wo(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Ih.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("canvas",{class:"color-item",style:b.normalizeStyle(i.colorItemStyle),ref:"canvas",draggable:i.draggable},null,12,BG)},Ih.__scopeId="data-v-02da71fd",Ih.__file="src/color-item/ColorItem.vue";var Xg=b.defineComponent({name:"Colors",components:{ColorItem:Ih},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(i,t){var e=t.emit;return{onSelectColor:function(n,o){e("change",n,o)},useColors:b.computed(function(){return i.colors.map(function(n){return jv(n,"hex",!0)})})}}}),PG={class:"colors"};function DM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function So(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(e),!0).forEach(function(n){Nv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):DM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}wo(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Xg.render=function(i,t,e,n,o,r){var s=b.resolveComponent("color-item");return b.openBlock(),b.createElementBlock("div",PG,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.useColors,function(l,a){return b.openBlock(),b.createBlock(s,{key:a,class:"color-item",size:16,value:l,border:!1,"border-radius":3,selected:i.selectedIndex===a,onClick:b.withModifiers(function(h){return i.onSelectColor(l,+a)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Xg.__scopeId="data-v-0f8b52a8",Xg.__file="src/picker/Colors.vue";var qg=b.defineComponent({name:"Picker",components:{Colors:Xg,Saturation:Wg,Hue:Ng,Alpha:Vg,InputValue:$g},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}},formatOptions:{type:[Boolean,Array]}},emits:["change","formatChange"],setup:function(i,t){var e=t.emit,n=b.computed(function(){return So(So({},i.style),{},{width:i.showAlpha?"230px":"205px"})}),o=b.ref(),r=b.ref(),s=b.ref(),l=function(){var p,m=(p=i.value)===null||p===void 0?void 0:p.trim();if(m!=null&&m!==""){var v=Yg(m);return IM(Kg(m,v,i.showAlpha))}return null};b.watch(function(){return i.value},function(){i.value!==b.unref(s)&&(o.value=l())},{immediate:!0}),b.watch(function(){return[b.unref(o),i.format]},function(p){var m=Ll(p,2),v=m[0],C=m[1],S="";v!=null?(S=PM(So({},v),i.format,i.showAlpha),r.value=So({},v)):r.value=null,s.value=S;var _=l();JSON.stringify(v)!==JSON.stringify(_)&&JSON.stringify(v)!==JSON.stringify(C)&&e("change",S)},{immediate:!0});var a=b.computed(function(){var p;return((p=b.unref(o))===null||p===void 0?void 0:p.h)||0}),h=b.computed(function(){var p;return((p=b.unref(o))===null||p===void 0?void 0:p.s)||0}),d=b.computed(function(){var p;return((p=b.unref(o))===null||p===void 0?void 0:p.v)||0}),u=b.computed(function(){var p,m;return((p=b.unref(o))===null||p===void 0?void 0:p.a)!=null?(m=b.unref(o))===null||m===void 0?void 0:m.a:1}),c=b.computed(function(){return Fh(b.unref(a),b.unref(h),b.unref(d))}),g=b.computed(function(){return"rgb(".concat(b.unref(c).r,", ").concat(b.unref(c).g,", ").concat(b.unref(c).b,")")}),f=b.ref(-1);return{h:a,s:h,v:d,a:u,rgbStr:g,onSelectSaturation:function(p,m){f.value=-1,b.unref(o)==null?o.value={h:b.unref(a),s:p,v:m,a:b.unref(u)}:o.value=So(So({},b.unref(o)),{},{s:p,v:m})},onSelectHue:function(p){f.value=-1,b.unref(o)==null&&(o.value={h:p,s:b.unref(h),v:b.unref(d),a:b.unref(u)}),o.value=So(So({},b.unref(o)),{},{h:p})},onSelectAlpha:function(p){f.value=-1,b.unref(o)==null?o.value={h:b.unref(a),s:b.unref(h),v:b.unref(d),a:p}:o.value=So(So({},b.unref(o)),{},{a:p})},handleInputFormat:function(p){return i.showAlpha?wM[p]:SM[p]},colorValue:s,pickerStyle:n,onInputChange:function(p){f.value=-1,s.value=p},handleChange:function(){var p,m=(p=b.unref(s))===null||p===void 0?void 0:p.trim();if(m!==""){var v=i.showAlpha,C=Yg(m),S=Kg(m,C,v),_=function(y){var w=y.h,A=y.s,R=y.v,x=y.a;return!(isNaN(w)||isNaN(A)||isNaN(R)||isNaN(x))}(S);_?o.value=S:b.unref(r)!=null?o.value=b.unref(r):s.value=""}else o.value=null},selectColorIndex:f,onSelectColor:function(p,m){if(f.value=m,(p=p.trim())==="")o.value=null;else{var v=Yg(p);v?function(C,S,_){if(C.length!==0){var y=Kg(C,S,_),w=y.h,A=y.s,R=y.v;if(!(isNaN(w)||isNaN(A)||isNaN(R))){var x=1,M=y.a;isNaN(M)||(x=M),o.value={h:w,s:A,v:R,a:x}}}}(p,v,!0):o.value=null}},onFormatChange:function(p){e("formatChange",p)}}}}),HG={class:"picker-inner"},EG={class:"picker-header"};wo(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),qg.render=function(i,t,e,n,o,r){var s=b.resolveComponent("saturation"),l=b.resolveComponent("hue"),a=b.resolveComponent("alpha"),h=b.resolveComponent("input-value"),d=b.resolveComponent("Colors");return b.openBlock(),b.createElementBlock("div",{class:"picker",style:b.normalizeStyle(i.pickerStyle)},[b.createElementVNode("div",HG,[b.createElementVNode("div",EG,[b.createVNode(s,{class:"saturation",hue:i.h,saturation:i.s,value:i.v,onChange:i.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),b.createVNode(l,{class:"hue",hue:i.h,onChange:i.onSelectHue},null,8,["hue","onChange"]),i.showAlpha?(b.openBlock(),b.createBlock(a,{key:0,class:"alpha",alpha:i.a,color:i.rgbStr,onChange:i.onSelectAlpha},null,8,["alpha","color","onChange"])):b.createCommentVNode("v-if",!0)]),b.createVNode(h,{format:i.handleInputFormat(i.format),value:i.colorValue,showAlpha:i.showAlpha,width:i.showAlpha?150:125,formatOptions:i.formatOptions,onChange:i.onInputChange,onBlur:i.handleChange,onEnter:i.handleChange,onFormatChange:i.onFormatChange},null,8,["format","value","showAlpha","width","formatOptions","onChange","onBlur","onEnter","onFormatChange"]),i.colors.length>0?(b.openBlock(),b.createBlock(d,{key:0,class:"colors",colors:i.colors,"selected-index":i.selectColorIndex,onChange:i.onSelectColor},null,8,["colors","selected-index","onChange"])):b.createCommentVNode("v-if",!0)])],4)},qg.__scopeId="data-v-6ceadec6",qg.__file="src/picker/Picker.vue";var Zg=b.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(i){var t=b.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:b.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),lineHeight:"".concat(i.size,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(b.unref(t)==="dark"?"#2681ff":"#1890ff"):""}})}}});wo(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),Zg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("svg",{class:"add-color-item",style:b.normalizeStyle(i.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[b.createElementVNode("g",{class:"container"},[b.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},Zg.__scopeId="data-v-ceb1719c",Zg.__file="src/add-color-item/AddColorItem.vue";var Jg=b.defineComponent({name:"ColorPicker",components:{ColorItem:Ih,Picker:qg,AddColorItem:Zg},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean],default:"body"},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}},position:{type:String},placement:{type:String},formatOptions:{type:[Boolean,Array],default:!1}},emits:["change","update:value","update:showPicker","overflowMax","closePicker","formatChange"],setup:function(i,t){var e=t.emit,n=b.ref([]),o=b.computed(function(){return b.unref(n).map(function(x){return jv(x,"hex",i.showAlpha)})}),r=b.ref("hex");b.watch(function(){return i.format},function(){r.value=i.format},{immediate:!0}),b.watch(function(){return i.value},function(){var x=i.value||"",M=Array.isArray(x)?x:[x];n.value=M.map(function(T){return jv(T,b.unref(r),i.showAlpha)})},{immediate:!0});var s=b.ref(void 0),l=b.computed(function(){return b.unref(n)[b.unref(s)]}),a=b.ref(!1);b.watch(function(){return i.showPicker},function(){a.value=i.showPicker},{immediate:!0});var h,d,u=b.ref(null),c=b.ref(null),g=RM(u,c,{defaultStyle:{zIndex:i.zIndex},strategy:i.position,placement:i.placement}).style,f=function(){b.unref(u)==null&&(u.value=b.unref(R)[0]),b.unref(s)==null&&(s.value=0),i.showPicker===void 0?a.value=!0:e("update:showPicker",!0)},p=function(){s.value=void 0,i.showPicker===void 0?a.value=!1:e("update:showPicker",!1),e("closePicker",b.toRaw(Array.isArray(i.value)||i.addColor?b.unref(n):b.unref(n)[0]))},m=b.ref(),v=function(){var x=CM(zg.mark(function M(T){var B,H,k,P;return zg.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(H=T.target,(k=(B=H.dataset)===null||B===void 0?void 0:B.index)!=null&&k!==""){E.next=4;break}return E.abrupt("return");case 4:if(P=+k,b.unref(s)!==P){E.next=7;break}return E.abrupt("return");case 7:b.unref(s)!=null&&b.unref(s)!==P?(p(),h&&clearTimeout(h),h=setTimeout(function(){f(),clearTimeout(h)},100)):f(),s.value=P,u.value=H;case 10:case"end":return E.stop()}},M)}));return function(M){return x.apply(this,arguments)}}(),C=function(){var x=CM(zg.mark(function M(T){var B,H,k,P,E;return zg.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(P=T.target,!(!((B=b.unref(m))!==null&&B!==void 0&&B.isEqualNode(P))&&(!((H=b.unref(m))===null||H===void 0)&&H.contains(P)))){F.next=4;break}return F.abrupt("return");case 4:if(E=(k=b.unref(c))===null||k===void 0?void 0:k.$el,!(E!=null&&E.contains(P))){F.next=8;break}return F.abrupt("return");case 8:d&&clearTimeout(d),d=setTimeout(function(){b.unref(a)&&p()},0);case 10:case"end":return F.stop()}},M)}));return function(M){return x.apply(this,arguments)}}();b.watch(a,function(){b.unref(a)&&(f(),clearTimeout(d))});var S,_=b.ref(i.max>b.unref(n).length),y=b.computed(function(){return typeof i.popupContainer=="string"||kl(i.popupContainer)==="object"&&i.popupContainer!=null?i.popupContainer:"body"}),w=b.computed(function(){return typeof i.popupContainer=="boolean"&&i.popupContainer===!1}),A=b.computed(function(){return i.theme});b.watch(function(){return[i.theme,b.unref(c)]},function(){b.nextTick(function(){var x,M;(x=b.unref(m))===null||x===void 0||x.setAttribute("pick-colors-theme",b.unref(A)),(M=b.unref(c))===null||M===void 0||(M=M.$el)===null||M===void 0||M.setAttribute("pick-colors-theme",b.unref(A))})},{immediate:!0}),b.provide("theme",{theme:A});var R=b.ref([]);return b.onMounted(function(){document.addEventListener("mouseup",C,!1),i.showPicker&&f()}),b.onUnmounted(function(){document.removeEventListener("mouseup",C,!1),h&&(clearTimeout(h),h=null),d&&(clearTimeout(d),d=null)}),{valueList:n,colorItemSelected:function(x){return(i.addColor?b.unref(n).length>0:b.unref(n).length>1)&&b.unref(s)===x},selectedColor:l,selectedIndex:s,isShowPicker:a,addColorItemShow:_,onPickerChange:function(x){var M=b.unref(s),T=b.unref(n).slice(),B=b.unref(n).length;if(M!=null){M>=0?T[M]=x:(s.value=B,T.push(x));var H="";H=Array.isArray(i.value)||i.addColor?T:x,n.value=Array.isArray(H)?H:[H],e("update:value",H),e("change",H,x,M),i.addColor&&B>=i.max&&(_.value=!1,e("overflowMax"))}},colorPicker:m,onColorClick:v,pickerRef:c,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var M=x.target;S=+M.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var M=+x.target.dataset.index,T=CG(b.unref(n)),B=T[S];T.splice(S,1);var H=T.slice(0,M),k=T.splice(M),P=H.concat([B]).concat(k);e("update:value",P),e("change",P,P[S],S)},colorItemsRef:R,pickerStyle:g,values:o,teleportDisabled:w,toPopupContainer:y,formatValue:r,onFormatChange:function(x){r.value=x,e("formatChange",x)}}}});wo(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),Jg.render=function(i,t,e,n,o,r){var s=b.resolveComponent("color-item"),l=b.resolveComponent("add-color-item"),a=b.resolveComponent("picker");return b.openBlock(),b.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:t[0]||(t[0]=b.withModifiers(function(){return i.onColorItemDragStart&&i.onColorItemDragStart.apply(i,arguments)},["stop"])),onDragover:t[1]||(t[1]=b.withModifiers(function(){return i.onColorItemDragOver&&i.onColorItemDragOver.apply(i,arguments)},["prevent","stop"])),onDrop:t[2]||(t[2]=b.withModifiers(function(){return i.onColorItemDrop&&i.onColorItemDrop.apply(i,arguments)},["prevent","stop"])),onClick:t[3]||(t[3]=b.withModifiers(function(){return i.onColorClick&&i.onColorClick.apply(i,arguments)},["stop"]))},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.values,function(h,d){return b.openBlock(),b.createBlock(s,{class:"color-item",key:d,ref_for:!0,ref:function(u){return i.colorItemsRef[d]=u},size:i.size,width:i.width,height:i.height,value:h,selected:i.colorItemSelected(d),"data-index":d,draggable:i.valueList.length>1,format:i.formatValue},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),i.addColor&&i.addColorItemShow?(b.openBlock(),b.createBlock(l,{key:0,class:"add-color-item",ref:"addColorItem",selected:i.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):b.createCommentVNode("v-if",!0),(b.openBlock(),b.createBlock(b.Teleport,{to:i.toPopupContainer,disabled:i.teleportDisabled},[b.createVNode(b.Transition,null,{default:b.withCtx(function(){return[i.isShowPicker?(b.openBlock(),b.createBlock(a,{key:0,class:"picker",style:b.normalizeStyle(i.pickerStyle),ref:"pickerRef",value:i.selectedColor,format:i.formatValue,"show-alpha":i.showAlpha,colors:i.colors,formatOptions:i.formatOptions,onChange:i.onPickerChange,onFormatChange:i.onFormatChange},null,8,["style","value","format","show-alpha","colors","formatOptions","onChange","onFormatChange"])):b.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},Jg.__scopeId="data-v-3c43ade8",Jg.__file="src/ColorPicker.vue";const _Y="",kG=b.defineComponent({name:"ColorPick",components:{PickColors:Jg},props:{value:{type:String,default:""}},setup(i,{emit:t}){const e=b.ref(i.value);b.watch(()=>i.value,o=>{e.value=o},{immediate:!0});function n(){t("changeProp",b.unref(e))}return{myValue:e,onChange:n}}}),LG={class:"color-pick"};function FG(i,t,e,n,o,r){const s=b.resolveComponent("a-input"),l=b.resolveComponent("pick-colors");return b.openBlock(),b.createElementBlock("div",LG,[b.createVNode(s,{class:"input",size:"small",value:i.myValue,"onUpdate:value":t[0]||(t[0]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"]),b.createVNode(l,{value:i.myValue,"onUpdate:value":t[1]||(t[1]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"])])}const IG=Ti(kG,[["render",FG],["__scopeId","data-v-99378939"]]),DG=b.defineComponent({name:"Radio",props:{value:{type:String,default:""},options:{type:Array,default(){return[]}}},setup(i,{emit:t}){function e(n){t("changeProp",n.target.value)}return{onChange:e}}});function OG(i,t,e,n,o,r){const s=b.resolveComponent("a-radio-group");return b.openBlock(),b.createBlock(s,{value:i.value,size:"small",onChange:i.onChange,options:i.options,optionType:"button"},null,8,["value","onChange","options"])}const zG=Ti(DG,[["render",OG]]),wY="",WG=b.defineComponent({name:"PropertyConfig",components:{ColorPick:IG,Radio:zG},props:{config:{type:Object,default(){return{}}},selectedIndex:{type:Boolean},theme:{type:String,default:"light"}},setup(i){const t=[{label:"字体颜色",key:"color",component:"color-pick"},{label:"对齐方式",key:"align",component:"radio",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},{label:"图标",key:"icon",component:"radio",props:{options:[{label:"上涨",value:"increase"},{label:"下跌",value:"decline"}]}},{label:"图标颜色",key:"iconColor",component:"color-pick"}],e=b.ref([]);b.watch(()=>i.selectedIndex,()=>{if(i.selectedIndex>-1){const s=Object.keys(i.config);e.value=s}});function n(s,l){i.config[s]=l}function o(s,l){if(s.target.checked)i.config[l]="",b.unref(e).push(l);else{delete i.config[l];const a=b.unref(e).indexOf(l);b.unref(e).splice(a,1)}}const r=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":"");return{formConfig:t,handleSelect:o,selectedProperty:e,onChange:n,fontColor:r}}}),NG={class:"content"},VG={class:"list"};function jG(i,t,e,n,o,r){const s=b.resolveComponent("a-checkbox");return b.openBlock(),b.createElementBlock("div",NG,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor,height:"32px",lineHeight:"32px"})},"属性配置",4),b.createElementVNode("div",VG,[i.selectedIndex>-1?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(i.formConfig,({label:l,component:a,props:h,key:d},u)=>(b.openBlock(),b.createElementBlock("div",{class:"list-item",style:{display:"flex"},key:u},[b.createVNode(s,{checked:i.selectedProperty.includes(d),onChange:c=>i.handleSelect(c,d)},null,8,["checked","onChange"]),b.createElementVNode("span",{style:b.normalizeStyle({padding:"0 8px",color:i.fontColor})},b.toDisplayString(l),5),i.selectedProperty.includes(d)?(b.openBlock(),b.createBlock(b.resolveDynamicComponent(a),b.mergeProps({key:0,value:i.config[d],ref_for:!0},h,{onChangeProp:c=>i.onChange(d,c)}),null,16,["value","onChangeProp"])):b.createCommentVNode("",!0)]))),128)):b.createCommentVNode("",!0)])])}const $G=Ti(WG,[["render",jG],["__scopeId","data-v-285d450e"]]),GG=b.defineComponent({name:"ConditionalProperty",props:{theme:{type:String,default:"light"}},components:{ConditionalItemConfig:r$,ConditionalConfig:c$,PropertyConfig:$G},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref([]),r=b.ref(-1);let s="";const l=b.computed(()=>b.unref(r)>-1?b.unref(o)[b.unref(r)]:{});function a(c,g=[]){s=c,o.value=g,n.value=!0}function h(c){r.value=c}function d(){t("change",s,b.unref(o)),r.value=-1,n.value=!1}function u(){r.value=-1,o.value=[]}return b.watch(n,c=>{window.modalShow&&window.modalShow(c)}),e({showModal:a}),{visible:n,config:o,changeSelectedItem:h,selectedConfig:l,selectedIndex:r,handleOk:d,handleClear:u}}}),UG={style:{display:"flex"}};function KG(i,t,e,n,o,r){const s=b.resolveComponent("conditional-item-config"),l=b.resolveComponent("conditional-config"),a=b.resolveComponent("property-config"),h=b.resolveComponent("a-button"),d=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(d,{wrapClassName:i.theme,title:"条件属性",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.visible=u),"ok-text":"确认","cancel-text":"取消",style:{width:"950px",top:"60px",height:"700px"},maskClosable:!1,destroyOnClose:!0,onOk:i.handleOk},{footer:b.withCtx(()=>[b.createVNode(h,{onClick:t[0]||(t[0]=u=>i.visible=!1)},{default:b.withCtx(()=>t[2]||(t[2]=[b.createTextVNode("取消")])),_:1}),b.createVNode(h,{onClick:i.handleClear},{default:b.withCtx(()=>t[3]||(t[3]=[b.createTextVNode("清除筛选")])),_:1},8,["onClick"]),b.createVNode(h,{type:"primary",onClick:i.handleOk},{default:b.withCtx(()=>t[4]||(t[4]=[b.createTextVNode("确定")])),_:1},8,["onClick"])]),default:b.withCtx(()=>[b.createElementVNode("div",UG,[b.createVNode(s,{config:i.config,theme:i.theme,onChange:i.changeSelectedItem},null,8,["config","theme","onChange"]),b.createVNode(l,{config:i.selectedConfig.conditions,theme:i.theme,isSelected:i.selectedIndex>-1},null,8,["config","theme","isSelected"]),b.createVNode(a,{config:i.selectedConfig,selectedIndex:i.selectedIndex,theme:i.theme},null,8,["config","selectedIndex","theme"])])]),_:1},8,["wrapClassName","visible","onOk"])}const YG=Ti(GG,[["render",KG]]),SY="",XG=b.defineComponent({name:"PivotChart",props:{data:{type:Object,default(){return{dimensionData:{},xLabel:"",yLabel:""}}},theme:{type:String,default:"light"}},components:{FilterOutlined:zT,MinusSquareOutlined:Dj,PivotFilter:cT},setup(i,{expose:t}){const e=b.ref();let n;const o=b.ref([]),r=b.computed(()=>{var k;return(k=b.unref(o)[b.unref(o).length-1])==null?void 0:k.key}),s=b.ref([]),l=b.ref(!1),a=b.ref(),h=b.ref({});let d={};const u=b.reactive({position:"absolute",top:"0",left:"0"});let c="",g;function f(){s.value=[],o.value=[],d={};const{dimensionData:k,xLabel:P}=i.data,E=k[P].map(F=>F.value);m(P,E),b.unref(o).push({key:P,drillValue:"",xAxisData:E}),v()}let p=[];b.onMounted(()=>{n=hB.init(e.value),S()});function m(k,P){const{yLabel:E,records:F}=i.data;let I=[];P.forEach(()=>{I.push(0)}),F.forEach(L=>{if(L[E]!==void 0){const D=P.indexOf(L[k]);if(D>-1){let O=!0;b.unref(o).forEach(W=>{W.drillValue&&L[W.key]!==W.drillValue&&(O=!1)});const V=Number(L[E]);O&&!isNaN(V)&&(I[D]+=Number(V))}}}),I=I.map(L=>L.toFixed(2)),g={tooltip:{},xAxis:{data:P},yAxis:{},series:[{name:E,type:"bar",label:{show:!0,position:"top"},data:I}]},p=I,n.setOption(g)}function v(){const k=Object.keys(i.data.dimensionData),P=b.unref(o).map(F=>F.key),E=[];k.forEach(F=>{P.includes(F)||E.push(F)}),s.value=E}function C(){c="",l.value=!1}function S(){n.on("contextmenu",function(k){const{event:{event:P},name:E}=k;c=E,P.preventDefault(),u.left=P.offsetX+90+"px",u.top=P.offsetY+80+"px",l.value=!0}),document.addEventListener("click",C)}function _(k){const P=[],{records:E}=i.data;for(const F of E){let I=!0;for(const L of b.unref(o))L.drillValue&&F[L.key]!==L.drillValue&&(I=!1);I&&!P.includes(F[k])&&P.push(F[k])}return P}function y(k){b.unref(o)[b.unref(o).length-1].drillValue=c;const P=_(k);m(k,P),b.unref(o).push({key:k,drillValue:"",xAxisData:P}),v()}function w(k,P){b.unref(o).splice(k+1,b.unref(o).length-k-1),b.unref(o)[k].drillValue="";const E=_(P);m(P,E),T(),v()}function A(k,P){const E=g.series[0].data,F=g.xAxis.data,I=E.map((D,O)=>({value:D,label:F[O]}));let L;P==="asc"?k==="dimension"?L=I.sort((D,O)=>D.label.localeCompare(O.label)):L=I.sort((D,O)=>D.value-O.value):P==="desc"&&(k==="dimension"?L=I.sort((D,O)=>O.label.localeCompare(D.label)):L=I.sort((D,O)=>O.value-D.value)),g.series[0].data=L.map(D=>D.value),g.xAxis.data=L.map(D=>D.label),n.setOption(g)}function R(k){if(k==="dimension"){const P=_(b.unref(r));m(b.unref(r),P),T()}else d={},T()}function x(k){if(k==="dimension"){const P=b.unref(o)[b.unref(o).length-1].xAxisData.map(E=>({value:E}));h.value={fieldName:b.unref(r),key:b.unref(r),type:k,filterData:g.xAxis.data,valueList:P}}else k==="indicators"&&(h.value={fieldName:i.data.yLabel,key:i.data.yLabel,type:"indicators",filterData:d});b.nextTick(()=>{a.value.show()})}function M({checkKeys:k,type:P}){P==="dimension"?m(b.unref(r),k):P==="indicators"&&(d=k,T())}function T(){const k=b.unref(o)[b.unref(o).length-1].xAxisData;let P=p.map((E,F)=>({value:E,label:k[F]}));P=P.filter(E=>B(E.value)),g.series[0].data=P.map(E=>E.value),g.xAxis.data=P.map(E=>E.label),n.setOption(g)}function B(k){let P=!1,{rule:E,value:F}=d;switch(F=Number(F),E){case"LESS":P=k<F;break;case"GREATER":P=k>F;break;case"EQUAL":P=k===F;break;case"NOT_EQUAL":P=k!==F;break;default:P=!0;break}return P}b.onBeforeUnmount(()=>{document.removeEventListener("click",C)}),t({init:f});const H=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":"");return{echartRef:e,dropdownList:s,isShowMenu:l,curXLabel:r,menuStyle:u,drillDimension:y,dimensionMap:o,deleteDimension:w,handleSort:A,handleClear:R,handleFilter:x,pivotFilterRef:a,filterData:h,onFilterChange:M,fontColor:H}}}),qG={style:{display:"flex",height:"400px"}},ZG={style:{flex:"0 0 200px"}},JG={style:{flex:"0 0 650px",height:"100%"}},QG={key:0,style:{display:"flex","align-items":"center"}},tU={key:0,class:"dimension-item"},eU={key:1,style:{height:"30px"}},iU={style:{width:"100%",height:"100%"},ref:"echartRef"},nU=["onClick"];function oU(i,t,e,n,o,r){const s=b.resolveComponent("filter-outlined"),l=b.resolveComponent("a-menu-item"),a=b.resolveComponent("a-menu"),h=b.resolveComponent("a-dropdown"),d=b.resolveComponent("minus-square-outlined"),u=b.resolveComponent("pivot-filter");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",qG,[b.createElementVNode("div",ZG,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},[b.createTextVNode(" 横轴:"+b.toDisplayString(i.curXLabel)+" ",1),b.createVNode(h,null,{overlay:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{key:"asc",onClick:t[0]||(t[0]=c=>i.handleSort("dimension","asc"))},{default:b.withCtx(()=>t[8]||(t[8]=[b.createTextVNode("升序")])),_:1}),b.createVNode(l,{key:"desc",onClick:t[1]||(t[1]=c=>i.handleSort("dimension","desc"))},{default:b.withCtx(()=>t[9]||(t[9]=[b.createTextVNode("降序")])),_:1}),b.createVNode(l,{key:"filter",onClick:t[2]||(t[2]=c=>i.handleFilter("dimension"))},{default:b.withCtx(()=>t[10]||(t[10]=[b.createTextVNode("筛选")])),_:1}),b.createVNode(l,{key:"clear",onClick:t[3]||(t[3]=c=>i.handleClear("dimension"))},{default:b.withCtx(()=>t[11]||(t[11]=[b.createTextVNode("清除")])),_:1})]),_:1})]),default:b.withCtx(()=>[b.createVNode(s,{class:"filter-icon",style:b.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4),b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},[b.createTextVNode(" 纵轴:"+b.toDisplayString(i.data.yLabel)+" ",1),b.createVNode(h,null,{overlay:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{key:"asc",onClick:t[4]||(t[4]=c=>i.handleSort("indicators","asc"))},{default:b.withCtx(()=>t[12]||(t[12]=[b.createTextVNode("升序")])),_:1}),b.createVNode(l,{key:"desc",onClick:t[5]||(t[5]=c=>i.handleSort("indicators","desc"))},{default:b.withCtx(()=>t[13]||(t[13]=[b.createTextVNode("降序")])),_:1}),b.createVNode(l,{key:"filter",onClick:t[6]||(t[6]=c=>i.handleFilter("indicators"))},{default:b.withCtx(()=>t[14]||(t[14]=[b.createTextVNode("筛选")])),_:1}),b.createVNode(l,{key:"clear",onClick:t[7]||(t[7]=c=>i.handleClear("indicators"))},{default:b.withCtx(()=>t[15]||(t[15]=[b.createTextVNode("清除")])),_:1})]),_:1})]),default:b.withCtx(()=>[b.createVNode(s,{class:"filter-icon",style:b.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4)]),b.createElementVNode("div",JG,[i.dimensionMap.length>1?(b.openBlock(),b.createElementBlock("div",QG,[b.createElementVNode("span",{style:b.normalizeStyle({color:i.fontColor})},"钻取维度:",4),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dimensionMap,(c,g)=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:g},[c.drillValue?(b.openBlock(),b.createElementBlock("div",tU,[b.createVNode(d,{class:"dimension-icon",onClick:f=>i.deleteDimension(g,c.key)},null,8,["onClick"]),b.createTextVNode(b.toDisplayString(c.key)+"("+b.toDisplayString(c.drillValue)+") ",1)])):b.createCommentVNode("",!0)],64))),128))])):(b.openBlock(),b.createElementBlock("div",eU)),b.createElementVNode("div",iU,null,512)]),b.withDirectives(b.createElementVNode("div",{style:b.normalizeStyle(i.menuStyle),class:"dropdown-menu"},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dropdownList,c=>(b.openBlock(),b.createElementBlock("div",{class:"item",key:c,onClick:g=>i.drillDimension(c)},"下钻"+b.toDisplayString(c),9,nU))),128))],4),[[b.vShow,i.isShowMenu]])]),b.createVNode(u,{ref:"pivotFilterRef",theme:i.theme,data:i.filterData,onChange:i.onFilterChange},null,8,["theme","data","onChange"])],64)}const rU=Ti(XG,[["render",oU],["__scopeId","data-v-fd1263c8"]]),sU=b.defineComponent({components:{PivotChart:rU},name:"ChartModal",props:{theme:{type:String,default:"light"}},setup(i,{expose:t}){const e=b.ref(!1),n=b.ref({}),o=b.ref();function r(s){n.value=s,e.value=!0,b.nextTick(()=>{o.value.init()})}return b.watch(e,s=>{window.modalShow&&window.modalShow(s)}),t({showModal:r}),{visible:e,chartOptions:n,chartRef:o}}});function lU(i,t,e,n,o,r){const s=b.resolveComponent("pivot-chart"),l=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(l,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=a=>i.visible=a),"ok-text":"确认","cancel-text":"取消",title:"图形",style:{width:"900px"},destroyOnClose:!0,onOk:t[1]||(t[1]=a=>i.visible=!1)},{default:b.withCtx(()=>[b.createVNode(s,{data:i.chartOptions,theme:i.theme,ref:"chartRef"},null,8,["data","theme"])]),_:1},8,["wrapClassName","visible"])}const aU=Ti(sU,[["render",lU]]),hU=b.defineComponent({name:"PivotAggregate",props:{theme:{type:String,default:"light"}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref([]),r=b.ref(""),s=[{label:"合计",value:"SUM"},{label:"平均值",value:"AVG"},{label:"计数",value:"COUNT"},{label:"最大值",value:"MAX"},{label:"最小值",value:"MIN"},{label:"方差",value:"VAR"},{label:"标准差",value:"STDEV"}];function l(){t("confirm",b.unref(o),r.value),n.value=!1}function a(d,u){o.value=Qe.cloneDeep(d),r.value=u,n.value=!0}const h=()=>document.getElementsByClassName("aggregate-modal")[0]||document.body;return b.watch(n,d=>{window.modalShow&&window.modalShow(d)}),e({showModal:a}),{visible:n,aggregationType:o,options:s,dimensionKey:r,handleOk:l,getPopupContainer:h}}});function dU(i,t,e,n,o,r){const s=b.resolveComponent("a-select"),l=b.resolveComponent("a-form-item"),a=b.resolveComponent("a-form"),h=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(h,{wrapClassName:i.theme+" aggregate-modal",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:i.dimensionKey+"-聚合",destroyOnClose:!1,maskClosable:!1,onOk:i.handleOk,onCancel:t[2]||(t[2]=d=>i.visible=!1)},{default:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{label:"聚合方式"},{default:b.withCtx(()=>[b.createVNode(s,{value:i.aggregationType,"onUpdate:value":t[0]||(t[0]=d=>i.aggregationType=d),allowClear:"",options:i.options,mode:"multiple",getPopupContainer:i.getPopupContainer},null,8,["value","options","getPopupContainer"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])}const uU=Ti(hU,[["render",dU]]),cU=b.defineComponent({name:"PivotTop",props:{theme:{type:String,default:"light"}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(""),r=b.ref("");function s(){t("confirm",{value:b.unref(o),key:b.unref(r)}),n.value=!1}function l(a){const{value:h,key:d}=a;o.value=h,n.value=!0,r.value=d}return b.watch(n,a=>{window.modalShow&&window.modalShow(a)}),e({showModal:l}),{visible:n,topNum:o,handleOk:s}}});function gU(i,t,e,n,o,r){const s=b.resolveComponent("a-input"),l=b.resolveComponent("a-form-item"),a=b.resolveComponent("a-form"),h=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(h,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:"维度取Top",destroyOnClose:!0,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{label:"维度取Top"},{default:b.withCtx(()=>[b.createVNode(s,{value:i.topNum,"onUpdate:value":t[0]||(t[0]=d=>i.topNum=d),type:"number",style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","onOk"])}const fU=Ti(cU,[["render",gU]]);let Dh=(i=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(i));for(;i--;){let n=e[i]&63;n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n<63?t+="_":t+="-"}return t};const xY="",pU=b.defineComponent({name:"PivotDetail",components:{ATable:Ii.Table},props:{theme:{type:String,default:"light"},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(!1),r=b.ref([]),s=b.ref([]),l=b.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showTotal:d=>`共 ${d} 条数据`});async function a(d){var C;o.value=!0,n.value=!0;const{args:u={},dimension:c,indicator:g,splitSymbol:f}=d,{originData:p=[],cellHeaderPaths:{colHeaderPaths:m=[],rowHeaderPaths:v=[]}}=u;if(p!=null&&p.length){const S=p[0],_=m!=null&&m.length?m[m.length-1]:"",y=m.filter(T=>T.dimensionKey).concat(v.filter(T=>T.dimensionKey)).map(T=>T.dimensionKey);if(!(_!=null&&_.indicatorKey)||!y.length)return;const w=g.find(T=>T.label===_.indicatorKey),A={};for(const T of c)if(y.includes(T.label)){const H=(S[T.label]||"").split(f)||[];A[T.typeGuid]=H!=null&&H.length?H[H.length-1]:""}const R=await vs.post(`${i.indicatorUrl}/diagram/obtainDataSetData`,{pageId:i.pageId,indexCode:(w==null?void 0:w.indexCode)||"",param:A},{headers:{Authentication:i.indicatorToken,operateContext:i.context}}),{columns:x=[],data:M=[]}=((C=R==null?void 0:R.data)==null?void 0:C.data)||{};r.value=x.filter(T=>T).map(T=>({title:T,dataIndex:T})),s.value=M.map(T=>({...T,uid:Dh(6)}))}o.value=!1}b.watch(n,d=>{window.modalShow&&window.modalShow(d)});const h=d=>{b.unref(l).current=d.current};return e({showModal:a}),{visible:n,loading:o,pagination:l,columns:r,dataSource:s,handleTableChange:h}}}),mU={key:0,class:"spin-container"};function vU(i,t,e,n,o,r){const s=b.resolveComponent("a-spin"),l=b.resolveComponent("a-table"),a=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(a,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=h=>i.visible=h),width:"40%",title:"指标明细",destroyOnClose:!0,footer:null,bodyStyle:{maxHeight:"50vh",overflow:"auto"}},{default:b.withCtx(()=>[i.loading?(b.openBlock(),b.createElementBlock("div",mU,[b.createVNode(s,{size:"large"})])):b.createCommentVNode("",!0),i.loading?b.createCommentVNode("",!0):(b.openBlock(),b.createBlock(l,{key:1,"row-key":h=>h.uid,columns:i.columns,"data-source":i.dataSource,pagination:i.pagination,onChange:i.handleTableChange},null,8,["row-key","columns","data-source","pagination","onChange"]))]),_:1},8,["wrapClassName","visible"])}const bU=Ti(pU,[["render",vU],["__scopeId","data-v-bedfbe83"]]),CU=(i,t)=>{i.register.icon("sortDown",{name:"sortDown",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"取消排序",placement:"top"}}),i.register.icon("sortUp",{name:"sortUp",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击降序",placement:"top"}}),i.register.icon("sortNormal",{name:"sortNormal",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击升序",placement:"top"}})},yU=b.defineComponent({props:{node:{type:[Object,String],required:!0}},render(){return this.node}}),_U={mounted(i){i.focus()}},wU=b.defineComponent({name:"PivotConfig",directives:{focus:_U},props:{theme:{type:String,default:"light"},fullMode:{type:Boolean,default:!1},pageId:{type:String,default:""}},components:{VNodeRender:yU,draggable:ab,DeleteOutlined:DT},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(),r=b.ref([]),s=b.ref([{title:"行维度",icon:b.createVNode(Aj),fields:[]},{title:"列维度",icon:b.createVNode(wj),fields:[]},{title:"指标",icon:b.createVNode(Jj),fields:[]}]),l=(y=[],w=[])=>{for(const A of b.unref(s))A.fields=[];for(const A of y)A.positionType==="rows"?b.unref(s)[0].fields.push(Qe.cloneDeep(A)):A.positionType==="columns"&&b.unref(s)[1].fields.push(Qe.cloneDeep(A));b.unref(s)[2].fields=Qe.cloneDeep(w),n.value=!0},a=b.computed(()=>[...b.unref(s)[0].fields.map(y=>({...y,label:y.showTitle,positionType:"rows"})),...b.unref(s)[1].fields.map(y=>({...y,label:y.showTitle,positionType:"columns"}))]),h=b.computed(()=>b.unref(s)[2].fields),d=()=>{r.value=[],t("confirm",b.unref(a),b.unref(h)),n.value=!1},u=(y,w)=>{const A=w[y.oldIndex],{scope:R}=A;["IDX","BUILT_IN_IDX"].includes(R)?r.value=[0,1]:["DIM","BUILT_IN_DIM"].includes(R)&&(r.value=[2])},c=()=>{r.value=[]},g=()=>{s.value=Qe.cloneDeep(b.unref(s))},f=(y,w)=>{b.unref(s)[y].fields.splice(w,1)},p=b.ref(),m=b.ref(),v=b.ref(""),C=(y,w)=>{i.fullMode&&(p.value=`${y}_${w}`,m.value=Qe.cloneDeep(b.unref(s)[y].fields[w]))},S=()=>{if(b.unref(v)){const y=b.unref(p).split("_");Ii.message.error(b.unref(v)),b.unref(s)[y[0]].fields[y[1]].showTitle=b.unref(m).showTitle,v.value=""}p.value=""},_=y=>{const w=y.target.value,A=b.unref(a).concat(b.unref(h));w?A.find(x=>x.name!==b.unref(m).name&&x.showTitle===w)&&(v.value="名称不能重复"):v.value="不能为空"};return b.watch(n,y=>{window.modalShow&&window.modalShow(y)}),e({showModal:l}),{visible:n,fieldAreas:s,indSourceRef:o,maskList:r,currentEditItem:p,handleOk:d,onDragAreaStart:u,onDragEnd:c,handleDeleteField:f,handleEdit:C,onConfirmLabel:S,onDragAdd:g,onChangeLabel:_}}}),RY="",SU={class:"config-wrap"},xU={class:"area-content"},RU={class:"area-title"},AU={class:"field-item"},TU=["onClick"];function MU(i,t,e,n,o,r){const s=b.resolveComponent("v-node-render"),l=b.resolveComponent("a-input"),a=b.resolveComponent("delete-outlined"),h=b.resolveComponent("draggable"),d=b.resolveComponent("a-button"),u=b.resolveComponent("a-modal"),c=b.resolveDirective("focus");return b.openBlock(),b.createBlock(u,{wrapClassName:`${i.theme}`,title:"设置",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",maskClosable:!1,destroyOnClose:!1,style:{width:"500px"},bodyStyle:{padding:0},onOk:i.handleOk},{footer:b.withCtx(()=>[b.createVNode(d,{onClick:t[0]||(t[0]=g=>i.visible=!1)},{default:b.withCtx(()=>t[2]||(t[2]=[b.createTextVNode("取消")])),_:1}),b.createVNode(d,{type:"primary",onClick:i.handleOk},{default:b.withCtx(()=>t[3]||(t[3]=[b.createTextVNode("确定")])),_:1},8,["onClick"])]),default:b.withCtx(()=>[b.createElementVNode("div",SU,[b.createElementVNode("div",xU,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.fieldAreas,(g,f)=>(b.openBlock(),b.createElementBlock("div",{class:"area-item",key:f},[b.createElementVNode("div",RU,[b.createVNode(s,{class:"area-icon",node:g.icon},null,8,["node"]),b.createTextVNode(" "+b.toDisplayString(g.title),1)]),b.createVNode(h,{class:"area-list",list:g.fields,"item-key":"index",group:{name:"diGroup"},disabled:i.maskList.includes(f),onStart:p=>i.onDragAreaStart(p,g.fields),onEnd:i.onDragEnd,onAdd:i.onDragAdd},{item:b.withCtx(({index:p,element:m})=>[b.createElementVNode("div",AU,[i.currentEditItem===`${f}_${p}`?b.withDirectives((b.openBlock(),b.createBlock(l,{key:0,size:"small",value:m.showTitle,"onUpdate:value":v=>m.showTitle=v,onPressEnter:i.onConfirmLabel,onBlur:i.onConfirmLabel,onChange:i.onChangeLabel},null,8,["value","onUpdate:value","onPressEnter","onBlur","onChange"])),[[c]]):(b.openBlock(),b.createElementBlock("div",{key:1,style:{width:"100%"},onClick:v=>i.handleEdit(f,p)},b.toDisplayString(m.showTitle),9,TU)),i.fullMode?(b.openBlock(),b.createBlock(a,{key:2,style:{color:"red","padding-left":"8px"},onClick:v=>i.handleDeleteField(f,p)},null,8,["onClick"])):b.createCommentVNode("",!0)])]),_:2},1032,["list","disabled","onStart","onEnd","onAdd"])]))),128))])])]),_:1},8,["wrapClassName","visible","onOk"])}const BU=Ti(wU,[["render",MU],["__scopeId","data-v-7cedd0ba"]]),PU=b.defineComponent({name:"IndSourceList",components:{CaretRightOutlined:rj,CaretDownOutlined:ej,LoadingOutlined:Pj,Draggable:ab},props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},isSub:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},pageId:{type:String,default:""}},setup(i,{emit:t,expose:e}){const n=b.inject("indicatorUrl",""),o=b.inject("indicatorToken",""),r=b.inject("setItemDisabled",y=>!1),s=b.ref([]),l=b.ref(),a=b.reactive({pageSize:20,currentPage:1,totalResult:0}),h=b.ref(!1),d=b.ref(""),u=b.ref(!1);b.watch(()=>i.data,y=>{i.isSub&&(y==null||y.forEach(w=>{var A;w!=null&&w.isLeaf||(A=w.dataViewColumns)==null||A.forEach(R=>{R.show=!0,R.edit=!1,R.title&&(R.label=R.title)})}),s.value=y)},{deep:!0,immediate:!0});const c=()=>{var y;i.isSub||(y=b.unref(l))==null||y.removeEventListener("scroll",C)},g=async y=>{var A;if(b.unref(h))return;h.value=!0;const w={source:i.config.source||"INDICATOR_LIB",pageId:i.pageId,dataSourceId:i.config.dataSourceId||"",indexName:d.value};y?(y.loading=!0,w.indexTypeGuid=y.indexTypeGuid,w.isLeaf=y.isLeaf):a&&(w.queryRequest={pageSize:a.pageSize,pageNum:a.currentPage});try{const R=await vs.post(`${b.unref(n)}/diagram/sourceList`,w,{headers:{Authentication:o,operateContext:"ygt"}}),{success:x,data:M={}}=R.data;if(x){const{rows:T=[],total:B=0}=M;T==null||T.forEach(H=>{var k;(y==null?void 0:y.isLeaf)==="1"?(k=H.dataViewColumns)==null||k.forEach(P=>{P.show=!0,P.edit=!1,P.title&&(P.label=P.title)}):H.show=!1}),y?(y.children=T,y.show=!0,T!=null&&T.length||(y.noData=!0)):(s.value=b.unref(s).concat(T),a.totalResult=+B,((A=b.unref(s))==null?void 0:A.length)>=B&&c())}y&&(y.loading=!1),h.value=!1}catch{y&&(y.loading=!1),h.value=!1}},f=async y=>{const w=s.value[y],{children:A=[]}=w;A!=null&&A.length?w.show=!w.show:!w.noData&&w.isLeaf?g(w):w.noData&&(w.show=!w.show)},p=(y,w)=>{t("onDragStart",y,w)},m=()=>{t("onDragEnd")},v=y=>{y.show=!y.show},C=y=>{y.target.scrollTop+y.target.clientHeight+20>=y.target.scrollHeight&&(a.currentPage++,g())},S=async()=>{await g(),b.nextTick(async()=>{b.unref(l).scrollHeight===b.unref(l).clientHeight&&a.totalResult>b.unref(s).length&&(a.currentPage++,S())})},_=async y=>{var w;c(),u.value=!0,a.currentPage=1,a.totalResult=0,s.value=[],d.value=y,await S(),u.value=!1,(w=b.unref(l))==null||w.addEventListener("scroll",C)};return b.onMounted(async()=>{var y;i.isSub||(S(),(y=b.unref(l))==null||y.addEventListener("scroll",C))}),b.onUnmounted(()=>{c()}),e({handleSearch:_}),{columnRef:l,sourceList:s,searchLoading:u,onToggleGroup:f,onToggleSource:v,setItemDisabled:r,onDragStart:p,onDragEnd:m,mapDataSetScope:bP,mapScope:vP,getLoadType:CP,getUseType:yP,getSourceType:_P}}}),AY="",HU={key:0,class:"no-data"},EU={class:"column-item"},kU=["onClick"],LU={key:3,class:"item-name"},FU={class:"column-item"},IU={key:0},DU={key:1},OU={key:2},zU=["onClick"],WU={class:"item-name"},NU={class:"column-child-item"},VU={class:"field"},jU={class:"column-child-item-name"};function $U(i,t,e,n,o,r){const s=b.resolveComponent("loading-outlined"),l=b.resolveComponent("caret-down-outlined"),a=b.resolveComponent("caret-right-outlined"),h=b.resolveComponent("ind-source-list",!0),d=b.resolveComponent("a-tooltip"),u=b.resolveComponent("draggable"),c=b.resolveComponent("a-spin");return b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["columns",i.isSub?"sub-columns":""]),ref:"columnRef"},[b.createVNode(c,{spinning:i.searchLoading,tip:"数据源加载中..."},{default:b.withCtx(()=>{var g;return[!((g=i.sourceList)!=null&&g.length)&&!i.searchLoading?(b.openBlock(),b.createElementBlock("div",HU,"暂无数据")):i.hasChildren?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:1},b.renderList(i.sourceList,(f,p)=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:f.indexTypeGuid||f.id},[b.createElementVNode("div",EU,[b.createElementVNode("span",{class:"item-group",onClick:m=>i.onToggleGroup(p)},[f.loading?(b.openBlock(),b.createBlock(s,{key:0})):f.show?(b.openBlock(),b.createBlock(l,{key:1})):(b.openBlock(),b.createBlock(a,{key:2})),f.isLeaf?(b.openBlock(),b.createElementBlock("span",LU,b.toDisplayString(f.indexTypeCode+"."+f.indexTypeName),1)):b.createCommentVNode("",!0)],8,kU)]),f.show?(b.openBlock(),b.createBlock(h,{key:0,data:f.children,isSub:!0,hasChildren:f.isLeaf==="0",pageId:i.pageId,config:i.config,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd},null,8,["data","hasChildren","pageId","config","onOnDragStart","onOnDragEnd"])):b.createCommentVNode("",!0)],64))),128)):(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:2},b.renderList(i.sourceList,f=>(b.openBlock(),b.createElementBlock("div",{key:f.id,class:b.normalizeClass(i.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[b.createElementVNode("div",FU,[b.createVNode(d,null,{title:b.withCtx(()=>[b.createElementVNode("div",null,"加载类型:"+b.toDisplayString(i.getLoadType(f.loadType)),1),f.useType?(b.openBlock(),b.createElementBlock("div",IU,"数据使用系统:"+b.toDisplayString(i.getUseType(f.useType)),1)):b.createCommentVNode("",!0),f.systemSource?(b.openBlock(),b.createElementBlock("div",DU,"制度出处:"+b.toDisplayString(f.systemSource),1)):b.createCommentVNode("",!0),f.dataTo?(b.openBlock(),b.createElementBlock("div",OU,"数据来源:"+b.toDisplayString(i.getSourceType(f.dataTo)),1)):b.createCommentVNode("",!0)]),default:b.withCtx(()=>[b.createElementVNode("span",{class:"item-group",onClick:p=>i.onToggleSource(f)},[f.show?(b.openBlock(),b.createBlock(l,{key:0})):(b.openBlock(),b.createBlock(a,{key:1})),b.createElementVNode("span",WU,b.toDisplayString((f.indexCode?f.indexCode:"")+" "+f.name),1)],8,zU)]),_:2},1024)]),f.show?(b.openBlock(),b.createBlock(u,{key:0,modelValue:f.dataViewColumns,"onUpdate:modelValue":p=>f.dataViewColumns=p,group:{name:"diGroup",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:i.setItemDisabled(f.dataViewColumns),filter:".not-allow",onStart:p=>i.onDragStart(p,f),onEnd:i.onDragEnd},{item:b.withCtx(({element:p})=>[b.createElementVNode("div",NU,[b.createElementVNode("span",VU,"【"+b.toDisplayString(p.scope==="FIELD"?i.mapDataSetScope(p.genericType):i.mapScope(p.scope))+"】",1),b.createElementVNode("span",jU,b.toDisplayString(p.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart","onEnd"])):b.createCommentVNode("",!0)],2))),128))]}),_:1},8,["spinning"])],2)}const GU=Ti(PU,[["render",$U],["__scopeId","data-v-0f088f6e"]]),UU=b.defineComponent({name:"DragArea",props:{style:{type:Object,default:()=>({})},maskList:{type:Array,default:()=>[]}},setup(i,{emit:t}){return{onDragOver:s=>{s.preventDefault(),s.target.classList.add("highlight")},onDragLeave:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDragEnd:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDrop:s=>{s.preventDefault(),s.target.classList.remove("highlight");const l=Array.from(s.target.classList);l.includes("rows")?t("add","rows"):l.includes("columns")?t("add","columns"):l.includes("indicators")?t("add","indicators"):l.includes("filters")&&t("add","filters")}}}}),TY="";function KU(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"drag-area",style:b.normalizeStyle(i.style.main)},[i.maskList.includes(2)?(b.openBlock(),b.createElementBlock("div",{key:0,class:"area-wrap filters",onDragover:t[0]||(t[0]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[1]||(t[1]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[2]||(t[2]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[3]||(t[3]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.filters)},null,36)):b.createCommentVNode("",!0),i.maskList.includes(0)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:1,class:"area-wrap rows",onDragover:t[4]||(t[4]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[5]||(t[5]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[6]||(t[6]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[7]||(t[7]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.rows)},null,36)),i.maskList.includes(1)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:2,class:"area-wrap columns",onDragover:t[8]||(t[8]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[9]||(t[9]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[10]||(t[10]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[11]||(t[11]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.columns)},null,36)),i.maskList.includes(2)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:3,class:"area-wrap indicators",onDragover:t[12]||(t[12]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[13]||(t[13]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[14]||(t[14]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[15]||(t[15]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.indicators)},null,36))],4)}const YU=Ti(UU,[["render",KU],["__scopeId","data-v-01e4c58d"]]),XU=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r}=i;return async(l={})=>{var c;const a=aC(i,l),{url:h,...d}=a||{};let u=t;if(!u){const{pathname:g}=window==null?void 0:window.location;if(g){const f=g.split("/");f!=null&&f.length&&(u=f[f.length-1])}}if(h&&d)try{return await vs({url:`${e}${h}`,method:"post",headers:{Authentication:n,operateContext:o},data:{...d,dataSourceId:(r==null?void 0:r.dataSourceId)||"",pageId:u},signal:((c=window.controller)==null?void 0:c.signal)||""})}catch(g){console.error(g)}}},qU=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r={}}=i;return async(l={})=>{var h;const a=aC(i,l);try{return(await vs({url:`${e}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:n,operateContext:o},data:{source:(r==null?void 0:r.source)||"INDICATOR_LIB",pageId:t,indicatorList:(a==null?void 0:a.indicatorList)||[],classifications:(a==null?void 0:a.queryColumns)||[],dataSourceId:(r==null?void 0:r.dataSourceId)||""},signal:((h=window.controller)==null?void 0:h.signal)||""})).data.data}catch(d){console.error(d)}}},ZU={id:{type:String,default:""},name:{type:String,default:""},keyName:{type:String,default:""},type:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},position:{type:String,default:""},top:{type:String,default:""},left:{type:String,default:""},zIndex:{type:Number,default:1},events:{type:Array,default:()=>[]},dataType:{type:String,default:"indicator"},graphicConfig:{type:Object,default:()=>({})},data:{type:Array,default:()=>[]},scale:{type:Number,default:1},dimensionList:{type:Array,default:()=>[]},indicatorList:{type:Array,default:()=>[]},pageMode:{type:String,default:""},styleConfig:{type:Object,default:()=>({})},theme:{type:String,default:"light"},fullMode:{type:Boolean,default:!1},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""},enlargeContainer:{type:String,default:"body"},globalModel:{type:Object,default:()=>new Map},isIframeMode:{type:Boolean,default:!1},showLeftTree:{type:Boolean,default:!0},allowDrill:{type:Boolean,default:!1},showFullScreen:{type:Boolean,default:!0}},$v={LAST_DATA:"上期值",SAME_DATA:"同期值",DIFF_DATA:"增减额",MOM_DATA:"环比(%)",YOY_DATA:"同比(%)"},OM=[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"图形",menuKey:"graph"},{text:"筛选",menuKey:"filter"}],_s=["合计","平均值","计数","最大值","最小值","方差","标准差"],Gv=b.defineComponent({name:"PivotTable",components:{PivotFilter:cT,PivotProperty:n7,ConditionalProperty:YG,ChartModal:aU,PivotAggregate:uU,PivotTop:fU,PivotConfig:BU,IndSourceList:GU,DragArea:YU,PivotDetail:bU,SettingOutlined:$j,DatabaseOutlined:hj,ArrowsAltOutlined:Z7,ShrinkOutlined:Yj,FilterOutlined:zT,DeleteOutlined:DT},props:{...ZU},setup(i,{expose:t,emit:e}){let n=null;const o=b.ref(!1),r=b.ref(""),s=b.ref({}),l=b.ref(),a=b.ref({}),h=b.ref({}),d=b.ref({}),u=b.ref(),c=b.ref({}),g=b.ref(),f=b.ref(),p=b.ref(),m=b.ref(),v=b.ref(),C=b.ref(),S=b.ref(),_=b.ref(),y=b.ref(!1),w=b.ref({}),A=b.ref({}),R=b.ref({}),x=b.ref(),M=b.ref({}),T=b.ref("200px"),B=b.ref("200px"),H=b.ref(300),k=b.ref({}),P=b.ref(),E=b.ref(i.showLeftTree),F=b.ref(!1),I=b.ref({}),L=b.ref(0),D=b.ref(0),O=b.ref(),V=b.ref(!1),W=b.ref(),j=b.ref([]);b.provide("indicatorUrl",i.indicatorUrl),b.provide("indicatorToken",i.indicatorToken);let $=`|${Dh(6)}|`;const X=b.ref({}),K=()=>{const N={borderColor:b.unref(G).borderColor};X.value=N},U=b.computed(()=>{let N="#ECF1F5";switch(i.theme){case"default":N="#EAF0F9";break;case"dark":N="#FFFFFF";break}return{borderColor:"#E3E3E3",headerBgColor:N,headerColor:"#252525",bodyBgColor:"#FFFFFF",bodyColor:"#252525",indicatorsHeaderBgColor:N,indicatorsHeaderColor:"#252525",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#252525",aggregateBgColor:N,aggregateColor:"#252525",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"}}),Q=b.ref(1),dt=b.ref();new ResizeObserver(N=>{for(const Y of N){const{width:tt}=Y.contentRect;dt.value=tt,Q.value++,b.nextTick(()=>{XM()})}}).observe(document.body);const xt=b.computed(()=>{const{width:N}=i;return N.includes("%")&&Q.value?i.isIframeMode?dt.value:document.querySelector(`#pivotWrap_${i.id}`).clientWidth:parseFloat(N)}),G=b.computed(()=>{var lt;const N={},{styleConfig:Y}=i;let tt={};(lt=Object.keys(Y))!=null&<.length?tt=Y:tt=b.unref(U);for(const Z in tt)N[Z]=tt[Z]||"transparent";return N}),q=b.ref({}),ot=()=>{const N=Il();N&&(b.unref(q).width=N.width+2+"px"),b.unref(q).backgroundColor=hC(b.unref(G).headerBgColor,2)};b.watch(()=>i.theme,()=>{n&&(n==null||n.updateOption(gt))});const ct=b.computed(()=>{var N,Y,tt;return i.fullMode&&!((N=gt.rows)!=null&&N.length)&&!((Y=gt.columns)!=null&&Y.length)&&!((tt=gt.indicators)!=null&&tt.length)}),_t=b.computed(()=>{var N;return{width:(N=i.width)!=null&&N.includes("%")?"calc(100%)":parseFloat(i.width)-b.unref(H)+"px",height:"100%",backgroundColor:i.theme==="darkBlue"?"#081653":"#F1F1F1",color:i.theme==="darkBlue"?"#b2c3dd":""}}),yt=b.computed(()=>{const N={fontSize:"14px"};return b.unref(E)&&(i.theme==="darkBlue"?N.color="#00CCFF":N.color="#416EFF"),N}),ht=b.ref([]),et=b.ref([]),mt=b.computed(()=>{var N;return(N=b.unref(G))==null?void 0:N.dropDownMenuBgColor}),st=b.computed(()=>{var N;return(N=b.unref(G))==null?void 0:N.dropDownMenuColor}),Ft=b.computed(()=>{var N;return(N=b.unref(G))==null?void 0:N.dropDownMenuHightLightColor}),Ht="-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",vt=b.computed(()=>b.unref(ht).filter(N=>N.isInnerFilter).concat(b.unref(et).filter(N=>N.isInnerFilter)).sort((N,Y)=>N.timeStamp-Y.timeStamp));CU(V9,{sortNotActiveColor:b.unref(G).sortNotActiveColor,sortActiveColor:b.unref(G).sortActiveColor});const Pt=b.ref([]),_e=b.ref({}),ge=b.ref({}),gt=b.reactive({records:[],columnHeaderTitle:!0,excelOptions:{fillHandle:!0},rows:[],columns:[],indicators:[],corner:{titleOnDimension:"row"},dataConfig:{sortRules:[],filterRules:[]},widthMode:"standard",menu:{renderMode:"html",dropDownMenuHighlight:[]},theme:{cellInnerBorder:!1,underlayBackgroundColor:"transparent",headerStyle:{bgColor(N){return b.unref(Pt).includes(N.dataValue)?b.unref(G).indicatorsHeaderBgColor:b.unref(G).headerBgColor},color(N){return b.unref(Pt).includes(N.dataValue)?b.unref(G).indicatorsHeaderColor:b.unref(G).headerColor},borderColor:b.unref(G).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},cornerHeaderStyle:{bgColor(){return b.unref(G).headerBgColor},color:b.unref(G).headerColor,borderColor:b.unref(G).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},bodyStyle:{borderColor:b.unref(G).borderColor,color(N){var lt,Z;const Y=N.cellHeaderPaths.rowHeaderPaths,tt=N.cellHeaderPaths.colHeaderPaths;return _s.includes((lt=Y==null?void 0:Y[Y.length-1])==null?void 0:lt.value)?b.unref(G).aggregateColor:b.unref(Pt).includes((Z=tt==null?void 0:tt[tt.length-1])==null?void 0:Z.value)?b.unref(G).indicatorsBodyColor:b.unref(G).bodyColor},bgColor(N){var lt,Z;const Y=N.cellHeaderPaths.rowHeaderPaths,tt=N.cellHeaderPaths.colHeaderPaths;return _s.includes((lt=Y==null?void 0:Y[Y.length-1])==null?void 0:lt.value)?b.unref(G).aggregateBgColor:b.unref(Pt).includes((Z=tt==null?void 0:tt[tt.length-1])==null?void 0:Z.value)?b.unref(G).indicatorsBodyBgColor:b.unref(G).bodyBgColor},fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},rowHeaderStyle:{borderColor:b.unref(G).borderColor,bgColor(N){return _s.includes(N.dataValue)?b.unref(G).aggregateBgColor:b.unref(G).bodyBgColor},color(N){return _s.includes(N.dataValue)?b.unref(G).aggregateColor:b.unref(G).bodyColor},fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},frameStyle:{borderLineWidth:1,borderColor:b.unref(G).borderColor}}}),Le=b.computed(()=>{let N=0;return b.unref(E)&&i.fullMode&&(N=b.unref(H)),N}),Fe=b.computed(()=>{let N=0;return b.unref(F)&&(N=20),N}),me=5,Ve=b.ref({});b.watch(y,N=>{if(N){const Y={};b.nextTick(()=>{var Z,rt;const tt=Il();let lt=0;(Z=b.unref(vt))!=null&&Z.length&&(lt=(rt=b.unref(O))==null?void 0:rt.clientHeight),tt&&(Y.width=tt.width+"px",Y.height=tt.height+"px",Y.top=tt.top+lt+b.unref(Fe)+"px",Y.left=tt.left+b.unref(Le)+b.unref(Fe)+"px"),Ve.value=Y})}});const ne=b.ref([]),Rt=b.ref([]),Mt=b.ref({}),Vt=b.ref({}),Xt=b.ref([]),de=b.ref([]),$t=b.ref([]),Lt=b.ref([]),we=b.computed(()=>{const N=[];for(const Z of b.unref(ne)){const{data:rt,indicatorKey:ut="",calculateType:wt=""}=Z||{};N.push({label:rt.indicatorKey,columnName:rt.indicatorKey,location:"LEFT",show:!0,calcType:"BUILT_IN",builtInFormula:wt,builtInValueSource:ut})}const Y=[];b.unref(Rt).forEach((Z,rt)=>{const ut=b.unref(ht).find(ue=>ue.label===Z.key),wt=b.unref(et).find(ue=>ue.label===Z.key),ft=ut||wt,Dt={};rt<b.unref(Rt).length-1&&(Dt.join="&&"),(ft==null?void 0:ft.genericType)==="DATE"&&(Dt.dateFormat="YYYY-MM-DD"),ft&&Y.push({fieldName:ft.name,fieldType:ft.genericType,fieldValue:Array.isArray(Z.value)?Z.value.join(","):Z.value,hrpIndexCode:ft.indexCode,hrpIndexCodeNum:ft.indexCodeNum,id:ft.id,label:ft.label,rule:Z.rule,targetSource:"",typeGuid:Z.typeGuid||"",type:Z.type,...Dt})});const tt=[];if(Object.keys(b.unref(Mt)))for(const Z in b.unref(Mt))b.unref(Mt)[Z]&&tt.push({key:Z,num:b.unref(Mt)[Z],rule:"TOP"});const lt=[];if(Object.keys(b.unref(Vt)))for(const Z in b.unref(Vt)){const{order:rt,type:ut,columnData:wt,columnHeader:ft}=b.unref(Vt)[Z];if(rt.toLowerCase()==="default-sort")continue;const Dt={label:Z,order:rt.toUpperCase(),type:"COMBINATION",fieldType:ut};ut==="indicators"&&(Dt.columnHeader=ft,Dt.columnData=wt,Dt.type="NORMAL"),lt.push(Dt)}return{calc:N,filter:Y,truncations:tt,sorts:lt,aggregateMethod:b.unref(M)||{}}}),Et=qU(i),Ut=XU(i),Ae=b.ref({}),ai=async()=>{var wt,ft,Dt,ue;const{dimensionList:N,graphicConfig:Y={}}=i,{queryColumnList:tt=[]}=Y,{rows:lt=[],columns:Z=[]}=gt,rt=(wt=b.unref($t))!=null&&wt.length?b.unref($t):[],ut=(ft=b.unref(Lt))!=null&&ft.length?b.unref(Lt):[];if(!(rt!=null&&rt.length))for(const Zt of lt)rt.push(Zt.dimensionKey);if(!(ut!=null&&ut.length))for(const Zt of Z)ut.push(Zt.dimensionKey);if(rt!=null&&rt.length||rt.push(...N.filter(Zt=>Zt.position==="rows").map(Zt=>Zt.key)),ut!=null&&ut.length||ut.push(...N.filter(Zt=>Zt.position==="columns").map(Zt=>Zt.key)),tt!=null&&tt.length)for(const Zt of tt)!rt.includes(Zt.name)&&!ut.includes(Zt.name)&&rt.push(Zt.name);Ae.value={...b.unref(we),rowDimensionKeys:rt,colDimensionKeys:ut,dimensions:(Dt=b.unref(Xt))!=null&&Dt.length?b.unref(Xt):b.unref(ht),indicators:(ue=b.unref(de))!=null&&ue.length?b.unref(de):b.unref(et)};try{const Zt=await Ut({pivotTableCal:b.unref(Ae)});YM(Zt)}catch(Zt){console.error(Zt)}},rK=N=>{b.unref(ne).find(Y=>Y.data.indicatorKey===N.data.indicatorKey)||ne.value.push(N),ai()},sK=N=>{const Y=b.unref(ne).findIndex(tt=>tt.data.indicatorKey===N);Y!==-1&&ne.value.splice(Y,1),ai()},jM=N=>{const{key:Y="",rule:tt,type:lt=""}=N||{};let Z=Qe.cloneDeep(tt);Array.isArray(tt)||(Z=[tt]);const rt=b.unref(ht).find(ft=>ft.label===Y),ut=b.unref(et).find(ft=>ft.label===Y),wt=rt||ut;if((wt==null?void 0:wt.genericType)==="DATE"&&(Z==null?void 0:Z.length)===1){const ft=Z[0].value;Z[0].rule="GREATER_EQUAL",Z[1]={rule:"LESS_EQUAL",value:ft}}for(let ft=b.unref(Rt).length-1;ft>=0;ft--){const Dt=b.unref(Rt)[ft];Dt.key===Y&&Dt.type===lt&&b.unref(Rt).splice(ft,1)}for(const ft of Z){const{rule:Dt,value:ue}=ft;Y&&Dt&&ue&&Rt.value.push({key:Y,rule:Dt,value:ue,type:lt,typeGuid:wt.typeGuid})}ai()},lK=()=>{Mt.value=b.unref(w)||{},ai()},$M=N=>{const{key:Y,order:tt,type:lt,columnData:Z=[]}=N;if(lt==="indicators"){let rt="";for(const ut in b.unref(Vt))b.unref(Vt)[ut].type==="indicators"&&(rt=ut);rt&&delete b.unref(Vt)[rt]}b.unref(Vt)[Y]={order:tt,type:lt,columnData:Z},ai()},Oh=()=>{const N=b.unref(ht),Y=b.unref(et),tt=N.filter(Z=>Z.positionType==="rows").map(Z=>Z.name),lt=N.filter(Z=>Z.positionType==="columns").map(Z=>Z.name);Xt.value=Qe.cloneDeep(N),de.value=Qe.cloneDeep(Y),$t.value=Qe.cloneDeep(tt),Lt.value=Qe.cloneDeep(lt),ai()};function aK(N,Y=!0,tt=-1){if(tt>-1)gt.indicators.splice(tt,0,...N);else for(const lt of N)gt.indicators.push(lt);Y&&n.updateOption(gt)}function hK({label:N,calcType:Y}){const tt=[],lt=b.unref(ge)[N]||[];for(const Z in $v)lt.indexOf(Z)===-1&&tt.push({text:$v[Z],menuKey:Z});return Y==="FORMULA"||!(tt!=null&&tt.length)?OM:[{text:"计算",menuKey:"calculate",children:tt},...OM]}function GM(){var Y;const N=[{text:"钻取",menuKey:"drill"},{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"筛选",menuKey:"filter"},{text:"聚合",menuKey:"aggregate"},{text:"取top",menuKey:"top"},{text:"删除",menuKey:"delete"}];return i.fullMode||i.allowDrill?b.unref(j)&&Array.isArray(b.unref(j))&&(Y=b.unref(j))!=null&&Y.length?N[0].children=b.unref(j).map(tt=>({text:tt.title||tt.label,menuKey:tt.label})):N.splice(0,1):(N.splice(0,1),N.splice(-1,1)),N}function dK(N,Y){y.value=!0,b.unref(M)[Y]=N||[],ai(),e("tableChange",{type:"9",data:{key:Y,types:N}})}function uK(N,Y=!0){var tt;for(const lt of N){const{key:Z,name:rt,type:ut,dimensionKey:wt,width:ft}=lt;let Dt;if(wt)Dt=lt;else{const ue={dimensionKey:Z,title:rt,width:ft?`${ft}%`:"auto",type:ut};ut==="columns"?ue.headerStyle={textStick:!0}:ut==="rows"&&(ue.cornerHeaderIcon="sortNormal"),ue.headerFormat=Zt=>{if(ut==="rows"){const Be=Zt==null?void 0:Zt.split($);return Be!=null&&Be.length?Be[Be.length-1]:Zt}else return Zt},Dt=ue}if(Dt&&(Dt.headerStyle={textStick:!0},gt[ut].push(Dt)),(tt=gt[ut])!=null&&tt.length)for(const ue of gt[ut])ue.cornerDropDownMenu=GM();gt.dataConfig.sortRules.push({sortField:Z,sortType:b.unref(r)})}Y&&n.updateOption(gt),b.nextTick(()=>{KM()})}function UM(N){const Y={},{records:tt}=gt;for(const lt of tt)for(const Z of N)yn(Y,Z)?Y[Z].find(rt=>rt.value===lt[Z])||Y[Z].push({value:lt[Z]}):Y[Z]=[{value:lt[Z]}];return Y}function KM(){const{dataset:{columns:N,rows:Y}}=n,tt=Y.concat(N);s.value=UM(tt)}async function YM(N){var Zt,Be,$i,Ss,zh;j.value=await Et({pivotTableCal:b.unref(Ae)});let Y=N;N?W.value=Qe.cloneDeep(N):Y=Qe.cloneDeep(b.unref(W)),y.value=!0;const{data:tt={}}=(Y==null?void 0:Y.data)||{},{rows:lt=[]}=tt,Z=[],rt=[];for(const zt of b.unref(ht)){if(!zt.show)continue;const Ge=gt[zt.positionType].find(Ie=>Ie.dimensionKey===zt.label);Ge?rt.push({...Ge,title:zt.showTitle}):rt.push({key:zt.label,name:zt.showTitle,type:zt.positionType,width:zt.width})}for(const zt of b.unref(et)){if(!zt.show)continue;const Ge=hK(zt),Ie=gt.indicators.find(yi=>yi.indicatorKey===zt.label);let be={};Ie?be={...Ie,dropDownMenu:Ge,title:zt.showTitle}:be={indicatorKey:zt.label,title:zt.showTitle,width:zt!=null&&zt.width?`${zt.width}%`:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},dropDownMenu:Ge,format:(yi,er,on,xs)=>{const Gi=xs.getRecordByCell(er,on)||[];return Gi[0]&&isNaN(+Gi[0][zt.label])?Gi[0][zt.label]:yi}},be&&(be.style={padding:[16,28,16,28]},Z.push(be))}if(gt.indicators=[],gt.rows=[],gt.columns=[],(Zt=b.unref(ne))!=null&&Zt.length)for(const zt of b.unref(ne))isNaN(+zt.position)||Z.splice(+zt.position,0,{...zt.data,calculateType:zt.calculateType});const{sortType:ut,col:wt,row:ft}=b.unref(x)||{};for(const zt of Z)zt&&(zt.headerIcon=Ge=>{const{col:Ie,row:be}=Ge;if(wt===Ie&&ft===be){let yi="sortNormal";return ut==="ASC"?yi="sortUp":ut==="DESC"&&(yi="sortDown"),yi}else return"sortNormal"});aK(Z,!1),uK(rt,!1);const Dt=[],ue=rt.filter(zt=>zt.type==="rows").map(zt=>zt.key||zt.dimensionKey);for(const zt of lt)for(const Ge in zt)if(!_s.includes(zt[Ge])){const Ie=ue.indexOf(Ge);if(Ie!==-1){const be=[];for(let yi=0;yi<=Ie;yi++){const er=String(zt[ue[yi]]);if(er.includes($)){const on=er.split($);on!=null&&on.length&&be.push(on[on.length-1])}else be.push(er)}be!=null&&be.length&&(zt[Ge]=be.join($))}}for(const zt of rt){const Ge=(zt==null?void 0:zt.key)||(zt==null?void 0:zt.dimensionKey);if(zt.type==="columns"&&!b.unref(R)[Ge])b.unref(R)[Ge]=Uv("",Ge,lt);else if(zt.type==="rows")if(b.unref(A)[Ge]){const{type:Ie}=b.unref(A)[Ge]||{};Dt.push(Uv(Ie,Ge,lt))}else if(!b.unref(x)||b.unref(x).sortField===Ge||!n)Dt.push(Uv("",Ge,lt));else{const Ie=gt.dataConfig.sortRules.find(be=>be.sortField===Ge);Ie&&Dt.push(Ie)}}if(b.unref(x)&&Dt.push(b.unref(x)),(Be=Object.keys(b.unref(R)))!=null&&Be.length)for(const zt in b.unref(R))Dt.push(b.unref(R)[zt]);if(gt.records=lt,gt.dataConfig.sortRules=Dt,lt!=null&<.length&&(b.unref(I).records=[]),($i=gt.columns)!=null&&$i.length?gt.columnHeaderTitle=!0:(Ss=gt.indicators)!=null&&Ss.length?gt.columnHeaderTitle=!1:(zh=gt.rows)!=null&&zh.length&&(gt.columnHeaderTitle=!0),n)n.updateOption(gt),b.nextTick(()=>{qM()}),y.value=!1;else{const zt=document.getElementById(`pivotTableContainer_${i.id}`);n=new aT(zt,gt),b.nextTick(()=>{qM(),o.value=!0,y.value=!1,i.isIframeMode&&(b.unref(L)&&n.setScrollTop(b.unref(L)),b.unref(D)&&n.setScrollLeft(b.unref(D)))}),wK()}}const ws=b.ref({});function XM(){const N=Il();if(N)if(b.unref(F)){const Y=document.querySelector(`#pivotWrap_${i.id}`).clientWidth;b.unref(ws).top=b.unref(Fe)+"px",b.unref(ws).right=Y-N.width-b.unref(Le)-b.unref(Fe)+"px"}else b.unref(ws).top="0",b.unref(ws).right=b.unref(xt)-N.width-b.unref(Le)+"px"}function qM(){var N;if(n&&!((N=gt.records)!=null&&N.length)){const{dataset:{rows:Y}}=n,tt={};for(const lt of Y)tt[lt]="";b.unref(I).dataConfig={...gt.dataConfig,filterRules:[]},b.unref(I).records=[tt],n.updateOption({...gt,...b.unref(I)})}}function cK(N,Y){y.value=!0,jM({type:"indicators",key:N,rule:Y}),e("tableChange",{type:"3",data:{type:"indicators",key:N,rule:Y}})}function gK(N,Y){y.value=!0,jM({type:"dimension",key:N,rule:Y}),e("tableChange",{type:"3",data:{type:"dimension",key:N,rule:Y}})}function fK(N,Y){let tt=!1;const lt=gt[Y].findIndex(rt=>rt.dimensionKey===N),Z=gt.dataConfig.sortRules.findIndex(rt=>rt.sortField===N);if(lt!==-1){if(gt[Y].splice(lt,1),i.fullMode||i.allowDrill){const rt=b.unref(ht).findIndex(ut=>ut.label===N);rt!==-1&&(b.unref(ht)[rt].isInnerFilter?(b.unref(ht)[rt].show=!1,tt=!0):b.unref(ht).splice(rt,1))}else for(const rt of gt[Y])rt.cornerDropDownMenu=GM();y.value=!0,Oh(),e("tableChange",{type:"7"})}Z!==-1&&(gt.dataConfig.sortRules[Z].sortType=r),n.updateOption(gt),b.nextTick(()=>{if(KM(),!tt){delete a.value[N];const rt=b.unref(Rt).findIndex(ut=>ut.key===N);rt!==-1&&b.unref(Rt).splice(rt,1)}})}function pK(N){const{indicators:Y}=gt,tt=Y.findIndex(lt=>lt.indicatorKey===N);if(tt!==-1){const lt=Y[tt];if(Y.splice(tt,1),lt.calculateType){const Z=lt.indicatorKey.split("@"+lt.calculateType)[0],rt=b.unref(ge)[Z].indexOf(lt.calculateType);rt!==-1&&b.unref(ge)[Z].splice(rt,1);const ut=b.unref(Pt).indexOf(lt.title);ut!==-1&&b.unref(Pt).splice(ut,1),delete b.unref(_e)[lt.title]}sK(lt.indicatorKey),e("tableChange",{type:"2",data:lt.indicatorKey})}}function Uv(N,Y,tt){let lt=[];const Z=new Set;for(const rt of tt){const ut=rt[Y];ut&&!_s.includes(ut)&&Z.add(ut)}return lt=Array.from(Z),N==="asc"?lt=lt.sort((rt,ut)=>rt.localeCompare(ut)):N==="desc"&&(lt=lt.sort((rt,ut)=>ut.localeCompare(rt))),{sortField:Y,sortBy:[...lt,..._s]}}function ZM(N,Y,tt,lt){y.value=!0;let{menu:{dropDownMenuHighlight:Z},rows:rt}=gt;lt=lt+1,Z=Z.filter(wt=>!(wt.type==="dimension"&&wt.field===Y)||wt.type==="indicator"),Z.push({col:tt,row:lt-1,field:Y,type:"dimension",menuKey:N}),gt.menu.dropDownMenuHighlight=Z;const ut=rt.find(wt=>wt.dimensionKey===Y);if(ut){let wt="sortNormal";N==="asc"?wt="sortUp":N==="desc"&&(wt="sortDown"),ut.cornerHeaderIcon=wt}n.updateOption(gt),N==="default-sort"?delete b.unref(A)[Y]:b.unref(A)[Y]={type:N},$M({key:Y,order:N,type:"dimension"}),e("tableChange",{type:"4",data:{key:Y,order:N,type:"dimension"}})}function JM(N,Y,tt,lt,Z){var Be;y.value=!0;const{menu:rt}=gt;let ut=rt.dropDownMenuHighlight,wt="";(Be=gt.rows)!=null&&Be.length&&(wt=gt.rows[gt.rows.length-1].dimensionKey);const ft=tt.filter(($i,Ss)=>Ss<tt.length-1),Dt=ft.map($i=>({columnName:$i.dimensionKey})),ue=ft.map($i=>$i.value),Zt=ut.findIndex($i=>$i.field===wt&&$i.type==="dimension");Zt!==-1&&ut.splice(Zt,1),ut=ut.filter($i=>$i.type==="dimension"),ut.push({col:lt,row:Z,field:Y,type:"indicator",menuKey:N}),gt.menu.dropDownMenuHighlight=ut,n.updateOption(gt),N==="default-sort"?x.value=null:x.value={sortField:wt,sortByIndicator:Y,sortType:N.toUpperCase(),query:ue,col:lt,row:Z},$M({key:Y,order:N,type:"indicators",columnData:ue,columnHeader:Dt}),e("tableChange",{type:"4",data:{key:Y,order:N,type:"indicators"}})}function QM({dimensionKey:N,value:Y=""}){const tt={};b.unref(a)[N]&&(tt.filterData=b.unref(a)[N]),d.value={tableInstance:n,fieldName:Y||N,key:N,type:"dimension",...tt},b.nextTick(()=>{b.unref(u).showModal(),e("tableChange",{type:"5",data:N})})}function mK(N,Y){d.value={tableInstance:n,fieldName:Y,key:N,type:"indicators",filterData:b.unref(h)[N]},b.nextTick(()=>{b.unref(u).showModal()})}function vK({indicatorKey:N,menuKey:Y}){y.value=!0;let tt=gt.indicators.length-1;const lt=`${N}@${Y}`,Z=`${N}(${$v[Y]}) fx`;b.unref(Pt).push(Z),b.unref(_e)[Z]=lt,gt.indicators.forEach((rt,ut)=>{rt.indicatorKey===N&&(tt=ut+1)}),b.unref(ge)[N]||(b.unref(ge)[N]=[]),b.unref(ge)[N].push(Y),rK({data:{indicatorKey:lt,title:Z,width:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},headerIcon:"sortNormal",dropDownMenu:[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"删除",menuKey:"delete"}],style:{padding:[16,28,16,28]},format:(rt,ut,wt,ft)=>{const Dt=ft.getRecordByCell(ut,wt)||[];return Dt[0]&&isNaN(+Dt[0][lt])?Dt[0][lt]:rt}},position:tt,indicatorKey:N,calculateType:Y}),e("tableChange",{type:"1",data:{indicatorKey:N,calculateType:Y}})}function bK(){const N=gt.rows[0]?gt.rows[0].cornerDropDownMenu:[],Y=gt.columns[0]?gt.columns[0].cornerDropDownMenu:[],tt=gt.rows.map(ut=>({...ut,cornerDropDownMenu:Y})),lt=gt.columns.map(ut=>({...ut,cornerDropDownMenu:N}));gt.columns=tt,gt.rows=lt;const{type:Z,len:rt}=gt.aggregate||{};Z&&(gt.records.splice(-rt),gt.aggregate={type:Z,len:0}),gt.menu.dropDownMenuHighlight=[],a.value={},h.value={},c.value={},gt.dataConfig.filterRules=[],n.updateOption(gt)}function CK({indicatorKey:N,fieldName:Y}){const tt=Qg(N);if(tt>-1){const lt=gt.indicators[tt].formatConfig||{};b.unref(g).showModal({...lt,indicatorKey:N,fieldName:Y})}}function yK(N){const Y=Qg(N);if(Y>-1){const tt=gt.indicators[Y].conditionalConfig||[];b.unref(f).showModal(N,tt)}}function Qg(N){return gt.indicators.findIndex(Y=>Y.indicatorKey===N)}function _K(N){const Y=b.unref(ht)[0],tt=b.unref(ht).map(rt=>rt.label),lt=UM(tt),Z={xLabel:Y.label,yLabel:N,dimensionData:lt,records:gt.records};b.unref(C).showModal(Z)}function wK(){n.on("scroll",N=>{const{scrollDirection:Y}=N;Y==="vertical"?L.value=n.getScrollTop():Y==="horizontal"&&(D.value=n.getScrollLeft())}),n.on("dblclick_cell",N=>{console.log("dblclick_cell",N);const{cellLocation:Y=""}=N;Y==="body"&&b.unref(_).showModal({args:N,splitSymbol:$,dimension:b.unref(ht),indicator:b.unref(et)})}),n.on("after_render",()=>{K(),XM(),ot(),b.nextTick(()=>{o.value=!0})}),n.on("icon_click",N=>{const{name:Y,col:tt,row:lt}=N;if(["sortNormal","sortUp","sortDown"].includes(Y)){const{rows:Z,indicators:rt}=gt,ut=n.getCellValue(tt,lt);let wt=b.unref(ht).find(Be=>Be.showTitle===ut);if(wt||(wt=b.unref(et).find(Be=>Be.showTitle===ut)),!wt)return;let ft=wt.label;b.unref(Pt).includes(ft)&&(ft=b.unref(_e)[ft]);const Dt=Z.find(Be=>Be.dimensionKey===ft),ue=rt.find(Be=>Be.indicatorKey===ft);let Zt="default-sort";if(Y==="sortUp"?Zt="desc":Y==="sortDown"?Zt="default-sort":(!Y||Y==="sortNormal")&&(Zt="asc"),ue){const Be=n.getCellHeaderPaths(tt,lt);JM(Zt,ft,(Be==null?void 0:Be.colHeaderPaths)||[],tt,lt)}else Dt&&ZM(Zt,ft,tt,lt)}}),n.on("show_menu",()=>{const N=document.querySelector(`#pivotTableContainer_${i.id} .vtable__menu-element`);N&&(N.classList.add("first"),T.value=parseFloat(N.style.left)+N.clientWidth+3+"px",B.value=parseFloat(N.style.top)+"px")}),n.on("dropdown_menu_click",N=>{const{menuKey:Y,field:tt,col:lt,row:Z}=N,{dimensionKey:rt,indicatorKey:ut,value:wt}=tt[tt.length-1];l.value=N;const ft=b.unref(j).find(Dt=>Dt.label===Y);if(ft){const Dt=b.unref(ht).findIndex(ue=>ue.label===rt);if(Dt!==-1){const ue={...ft,show:!0,positionType:"rows",showTitle:ft.title||ft.label};ht.value.splice(Dt+1,0,ue),y.value=!0,Oh(),e("tableChange",{type:"8"})}}switch(Y){case"drill":alert("无维度可钻取");break;case"delete":rt?fK(rt,"rows"):ut&&pK(ut);break;case"asc":case"desc":case"default-sort":rt?ZM(Y,rt,lt,Z):ut&&JM(Y,ut,tt,lt,Z);break;case"filter":rt?QM({dimensionKey:rt}):ut&&mK(ut,wt);break;case"LAST_DATA":case"SAME_DATA":case"DIFF_DATA":case"MOM_DATA":case"YOY_DATA":case"zb":vK({indicatorKey:ut,menuKey:Y});break;case"trans":bK();break;case"property":CK({indicatorKey:ut,fieldName:wt});break;case"conditionalProperty":yK(ut);break;case"aggregate":b.unref(p).showModal(b.unref(M)[rt]||[],rt);break;case"top":SK(rt);break;case"graph":_K(ut);break}})}function SK(N){b.unref(m).showModal({value:b.unref(w)[N]||"",key:N})}function xK(){b.unref(v).showModal(b.unref(ht),b.unref(et))}function RK(N=[],Y=[]){const tt=N.concat(Y).map(rt=>rt.name),lt=b.unref(ht).filter(rt=>rt.isInnerFilter&&!tt.includes(rt.name)).map(rt=>({...rt,show:!1})),Z=b.unref(et).filter(rt=>rt.isInnerFilter&&!tt.includes(rt.name)).map(rt=>({...rt,show:!1}));ht.value=[...N,...lt],et.value=[...Y,...Z],i.fullMode||i.allowDrill?(A.value={},x.value={},R.value={},y.value=!0,Oh(),e("tableChange",{type:"10",data:{dimensions:b.unref(ht),indicators:b.unref(et)}})):YM()}function AK(N){if(!b.unref(P))return;const{name:Y,scope:tt}=b.unref(P),lt=b.unref(ht).find(ft=>ft.name===Y),Z=b.unref(ht).findIndex(ft=>ft.name===Y),rt=b.unref(et).find(ft=>ft.name===Y),ut=b.unref(et).findIndex(ft=>ft.name===Y),wt={timeStamp:new Date().getTime()};if(["rows","columns"].includes(N))if(lt)if(lt.show){Ii.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else lt.positionType=N,lt.show=!0,b.unref(ht).push(lt),b.unref(ht).splice(Z,1);else b.unref(ht).push({...Qe.cloneDeep(b.unref(P)),...wt,positionType:N,showTitle:b.unref(P).label});else if(N==="indicators")if(rt)if(rt.show){Ii.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else rt.show=!0,b.unref(et).push(rt),b.unref(et).splice(ut,1);else b.unref(et).push({...Qe.cloneDeep(b.unref(P)),...wt,showTitle:b.unref(P).label});else if(N==="filters"){if(["IDX","BUILT_IN_IDX"].includes(tt))if(b.unref(vt).find(ft=>ft.name===Y)){Ii.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else rt?(rt.isInnerFilter=!0,rt.timeStamp=new Date().getTime()):b.unref(et).push({...Qe.cloneDeep(b.unref(P)),showTitle:b.unref(P).label,show:!1,isInnerFilter:!0,...wt});else if(["DIM","BUILT_IN_DIM"].includes(tt))if(b.unref(vt).find(ft=>ft.name===Y)){Ii.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else lt?(lt.isInnerFilter=!0,lt.timeStamp=new Date().getTime()):b.unref(ht).push({...Qe.cloneDeep(b.unref(P)),positionType:"filters",showTitle:b.unref(P).label,show:!1,isInnerFilter:!0,...wt})}y.value=!0,P.value=null,Oh(),e("tableChange",{type:"10",data:{dimensions:b.unref(ht),indicators:b.unref(et)}})}const TK=(N=[])=>{let Y=!1;for(const tt of b.unref(ht))if(!N.find(Z=>Z.typeGuid===tt.typeGuid)){Y=!0;break}return Y};b.provide("setItemDisabled",TK);const tB=()=>{},MK=({checkKeys:N,key:Y,type:tt})=>{tt==="dimension"?(a.value[Y]=N,c.value={},gK(Y,N)):tt==="indicators"&&(h.value[Y]=N,cK(Y,N))};function BK(N){const{indicatorKey:Y,unit:tt="",format:lt,floatLength:Z,position:rt}=N,ut=Qg(Y);if(ut>-1){const wt=gt.indicators[ut];wt.formatConfig=N,wt.format=(ft,Dt,ue,Zt)=>{const Be=Zt.getRecordByCell(Dt,ue)||[];return Be[0]&&isNaN(+Be[0][wt.indicatorKey])?Be[0][wt.indicatorKey]:(lt==="integer"?ft=Math.round(Number(ft)):lt==="float"&&!isNaN(Z)?ft=Number(ft).toFixed(Z):lt==="percent"&&(ft=Number(ft)*100+"%"),rt==="right"?ft+tt:tt+ft)},n.updateOption(gt)}}function PK(N,Y=[]){const tt=Qg(N);if(tt>-1){const lt=gt.indicators[tt];lt.conditionalConfig=Y;const Z=[];Y.forEach(rt=>{let ut="";rt.conditions.forEach((wt,ft)=>{ft>0&&(ut+=wt.join==="and"?" && ":" || "),ut+=`value${wt.operation}${wt.value}`}),Z.push(ut)}),lt.style.color=({dataValue:rt})=>{let ut="#333";return Y.forEach((wt,ft)=>{wt.color&&(ut=Kv(Z[ft],rt)?wt.color:ut)}),ut},lt.style.textAlign=({dataValue:rt})=>{let ut="left";return Y.forEach((wt,ft)=>{wt.align&&(ut=Kv(Z[ft],rt)?wt.align:ut)}),ut},lt.customRender=({rect:rt,dataValue:ut})=>{let wt=[];return Y.forEach((ft,Dt)=>{if(ft.icon&&Kv(Z[Dt],ut)){const Zt=mP(ft.icon,ft.iconColor);wt=[{type:"icon",x:ft.align!=="right"?15:rt.width-25,y:rt.height/2-7,svg:Zt,height:14,width:14}]}}),{elements:wt,renderDefault:!0}},n.updateOption(gt)}}function Kv(N,Y){N=N||"true";const tt=`function (value){
|
|
367
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yG(i){var t=function(e,n){if(kl(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n||"default");if(kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return kl(t)=="symbol"?t:t+""}function Nv(i,t,e){return(t=yG(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Wg=b.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=b.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),background:"hsl(".concat(i.hue,", 100%, 50%)")}});return{saturationStyle:n,sliderStyle:b.computed(function(){return{top:"".concat((100-i.value)/100*i.size-5,"px"),left:"".concat(i.saturation*i.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(o){var r=o.target.getBoundingClientRect(),s=r.left,l=r.top,a=function(d){var u=d.clientX,c=d.clientY,g=u-s,f=c-l;g<0&&(g=0),f<0&&(f=0),g>i.size&&(g=i.size),f>i.size&&(f=i.size);var p=g/i.size*100,m=100-f/i.size*100;e("change",p,m)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(o),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}});function wo(i,t){t===void 0&&(t={});var e=t.insertAt;if(i&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}wo(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Wg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"saturation",style:b.normalizeStyle(i.saturationStyle),onMousedown:t[0]||(t[0]=b.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[t[1]||(t[1]=b.createElementVNode("div",{class:"saturation-white"},null,-1)),t[2]||(t[2]=b.createElementVNode("div",{class:"saturation-black"},null,-1)),b.createElementVNode("div",{class:"slider",style:b.normalizeStyle(i.sliderStyle)},null,4)],36)},Wg.__scopeId="data-v-24517fec",Wg.__file="src/picker/Saturation.vue";var Ng=b.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=b.computed(function(){return{top:"".concat((1-i.hue/360)*i.height-2,"px"),height:"".concat(4,"px")}}),o=b.ref();return b.onMounted(function(){(function(){o.value.width=i.width,o.value.height=i.height;var r=o.value.getContext("2d"),s=r.createLinearGradient(0,0,0,i.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),r.fillStyle=s,r.fillRect(0,0,i.width,i.height)})()}),{canvas:o,sliderStyle:n,onSelect:function(r){var s=r.target.getBoundingClientRect().top,l=function(h){var d=h.clientY-s;d<0&&(d=0),d>i.height&&(d=i.height);var u=-100*d/i.height+100;e("change",360*u/100)},a=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a)}}}}),_G={ref:"canvas"};wo(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Ng.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"hue",onMousedown:t[0]||(t[0]=b.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[b.createElementVNode("canvas",_G,null,512),b.createElementVNode("div",{class:"slider",style:b.normalizeStyle(i.sliderStyle)},null,4)],32)},Ng.__scopeId="data-v-78b9f4f0",Ng.__file="src/picker/Hue.vue";var Vg=b.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(i,t){var e=t.emit,n=b.computed(function(){return{top:"".concat(i.alpha*i.height-2,"px"),height:"".concat(4,"px")}}),o=b.ref(),r=function(){var s=o.value.getContext("2d");o.value.width=i.width,o.value.height=i.height;var l=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);s.fillStyle=s.createPattern(l,"repeat"),s.fillRect(0,0,i.width,i.height);var a=s.createLinearGradient(0,0,0,i.height);a.addColorStop(.01,"rgba(255,255,255,0)"),a.addColorStop(.99,i.color),s.fillStyle=a,s.fillRect(0,0,i.width,i.height)};return b.watch(function(){return i.color},function(){r()}),b.onMounted(function(){r()}),{canvas:o,sliderStyle:n,onSelect:function(s){var l=s.target.getBoundingClientRect().top,a=function(d){var u=d.clientY-l;u<0&&(u=0),u>i.height&&(u=i.height);var c=parseFloat((u/i.height).toFixed(2));e("change",c)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(s),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}}),wG={ref:"canvas"};wo(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Vg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"alpha",onMousedown:t[0]||(t[0]=b.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[b.createElementVNode("canvas",wG,null,512),b.createElementVNode("div",{class:"slider",style:b.normalizeStyle(i.sliderStyle)},null,4)],32)},Vg.__scopeId="data-v-24dc9656",Vg.__file="src/picker/Alpha.vue";var wM={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},SM={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},SG={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function xM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Vv(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(e),!0).forEach(function(n){Nv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):xM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}var ys=null,RM=function(i,t,e){var n=b.ref({}),o=e||{},r=o.placement,s=o.defaultStyle,l={strategy:o.strategy||"absolute",placement:r||"auto",onFirstUpdate:function(){ys.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(a){var h=a.state,d=h.styles,u=h.placement,c=d.popper;n.value=Vv(Vv(Vv({},c),s),{},{transformOrigin:u==="top"?"center bottom":"center top"})}}]};return b.watch(function(){return[b.unref(i),b.unref(t)]},function(a,h){var d,u=Ll(a,2),c=u[0],g=u[1],f=Ll(h,2),p=f[0],m=f[1];if(c&&g&&(p!==c||m!==p)){(d=ys)===null||d===void 0||d.destroy();var v=c.$el||c,C=g.$el||g;b.nextTick(function(){ys=bG(v,C,l)})}}),b.onBeforeUnmount(function(){var a;ys&&((a=ys)===null||a===void 0||a.destroy(),ys=null)}),{instance:ys,style:n}},jg=b.defineComponent({props:{value:{type:String,default:"RGBA"},showAlpha:{type:Boolean},options:{type:[Boolean,Array]}},emits:["change"],setup:function(i,t){var e=t.emit,n=b.ref(null),o=b.ref(null),r=b.ref(!1),s=RM(n,o,{strategy:"fixed",defaultStyle:{zIndex:2}}).style,l=b.computed(function(){return Array.isArray(i.options)&&i.options.length>1}),a=b.computed(function(){var d=i.options,u=i.showAlpha,c=i.value;return Array.isArray(d)?u?d.map(function(g){return wM[g]}).filter(function(g){return!g.includes(c)}):d.map(function(g){return SM[g]}).filter(function(g){return!g.includes(c)}):[]}),h=function(d){var u,c,g=d.target;!((u=b.unref(n))!==null&&u!==void 0&&u.isEqualNode(g))&&(!((c=b.unref(n))===null||c===void 0)&&c.contains(g))||(r.value=!1)};return b.onMounted(function(){document.addEventListener("mouseup",h,!1)}),b.onUnmounted(function(){document.removeEventListener("mouseup",h,!1)}),{targetRef:n,selectorRef:o,selectorStyle:s,isShowSelector:r,isNeedSelect:l,formatOptions:a,onShow:function(){l.value&&(r.value=!0)},onFormatChange:function(d){e("change",SG[d])}}}}),xG={class:"format"},RG={key:0,class:"arrow"},AG=["onClick"];wo(".format[data-v-5f6e8f5e]{position:relative}.label[data-v-5f6e8f5e]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;position:relative;width:60px}[pick-colors-theme=dark] .label[data-v-5f6e8f5e]{background:#252930;color:#999}.arrow[data-v-5f6e8f5e]{height:6px;margin-bottom:4px;margin-left:5px;transform:rotate(135deg);width:6px}.arrow[data-v-5f6e8f5e],[pick-colors-theme=dark] .arrow[data-v-5f6e8f5e]{border-right:1px solid #999;border-top:1px solid #999}.selector[data-v-5f6e8f5e]{align-items:center;background:#f7f8f9;border-radius:5px;box-shadow:0 0 16px 0 rgba(0,0,0,.16);cursor:pointer;display:flex;flex-direction:column;font-weight:400;justify-content:center;padding:4px}[pick-colors-theme=dark] .selector[data-v-5f6e8f5e]{background:#252930;color:#999}.selector-item[data-v-5f6e8f5e]{align-items:center;display:flex;height:30px;justify-content:center;width:60px}.selector-item[data-v-5f6e8f5e]:hover{background:#e1f2fe}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]{color:#fff}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]:hover{background:#0087fa}.active-selector-item[data-v-5f6e8f5e]{background:#e1f2fe}[pick-colors-theme=dark] .active-selector-item[data-v-5f6e8f5e]{background:#0087fa}.v-enter-active[data-v-5f6e8f5e],.v-leave-active[data-v-5f6e8f5e]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-5f6e8f5e],.v-leave-to[data-v-5f6e8f5e]{opacity:0;transform:scaleY(0)}"),jg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",xG,[b.createElementVNode("div",{class:"label",ref:"targetRef",onClick:t[0]||(t[0]=function(){return i.onShow&&i.onShow.apply(i,arguments)})},[b.createElementVNode("span",null,b.toDisplayString(i.value),1),i.isNeedSelect?(b.openBlock(),b.createElementBlock("div",RG)):b.createCommentVNode("v-if",!0)],512),b.createVNode(b.Transition,null,{default:b.withCtx(function(){return[i.isShowSelector?(b.openBlock(),b.createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:b.normalizeStyle(i.selectorStyle)},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.formatOptions,function(s){return b.openBlock(),b.createElementBlock("div",{class:"selector-item",key:s,onClick:function(l){return i.onFormatChange(s)}},b.toDisplayString(s),9,AG)}),128))],4)):b.createCommentVNode("v-if",!0)]}),_:1})])},jg.__scopeId="data-v-5f6e8f5e",jg.__file="src/picker/input-value/FormatValue.vue";var $g=b.defineComponent({name:"Input",components:{FormatValue:jg},props:{format:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number},showAlpha:{type:Boolean},formatOptions:{type:[Boolean,Array]}},emits:["change","focus","blur","enter","formatChange"],setup:function(i,t){var e=t.emit;return{onInput:function(n){var o;e("change",(o=n.target)===null||o===void 0?void 0:o.value)},valueStyle:b.computed(function(){return{minWidth:"".concat(i.width,"px"),maxWidth:"".concat(i.width,"px"),width:"".concat(i.width,"px")}}),onFocus:function(){e("focus")},onBlur:function(){e("blur")},onEnter:function(){e("enter")},onFormatChange:function(n){e("formatChange",n)}}}}),TG={class:"input"},MG=[".value"];function AM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Wn(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?AM(Object(e),!0).forEach(function(n){Nv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):AM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}wo(".input[data-v-2c454c00]{display:flex;font-size:12px}.value[data-v-2c454c00]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-2c454c00]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-2c454c00]:focus{border:1px solid #1890ff;outline:none}"),$g.render=function(i,t,e,n,o,r){var s=b.resolveComponent("FormatValue");return b.openBlock(),b.createElementBlock("div",TG,[b.createVNode(s,{value:i.format,showAlpha:i.showAlpha,options:i.formatOptions,onChange:i.onFormatChange},null,8,["value","showAlpha","options","onChange"]),b.createElementVNode("input",{class:"value",style:b.normalizeStyle(i.valueStyle),".value":i.value,onFocus:t[0]||(t[0]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onInput:t[1]||(t[1]=function(){return i.onInput&&i.onInput.apply(i,arguments)}),onBlur:t[2]||(t[2]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onKeydown:t[3]||(t[3]=b.withKeys(function(){return i.onEnter&&i.onEnter.apply(i,arguments)},["enter"]))},null,44,MG)])},$g.__scopeId="data-v-2c454c00",$g.__file="src/picker/input-value/InputValue.vue";var TM=function(i,t,e){return[i,t*e/((i=(2-t)*e)<1?i:2-i)||0,i/2]},MM={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Gg=function(i){i=Math.min(Math.round(i),255);var t=Math.floor(i/16),e=i%16;return"".concat(MM[t]||t).concat(MM[e]||e)},BM=function(i){var t=i.r,e=i.g,n=i.b;return isNaN(t)||isNaN(e)||isNaN(n)?"":"#".concat(Gg(t)).concat(Gg(e)).concat(Gg(n))},Fl=function(i,t){var e;typeof(e=i)=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1&&(i="100%");var n=function(o){return typeof o=="string"&&o.indexOf("%")!==-1}(i);return i=Math.min(t,Math.max(0,parseFloat("".concat(i)))),n&&(i=parseInt("".concat(i*t),10)/100),Math.abs(i-t)<1e-6?1:i%t/parseFloat(t)},Fh=function(i,t,e){i=6*Fl(i,360),t=Fl(t,100),e=Fl(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:Math.round(255*h),g:Math.round(255*d),b:Math.round(255*u)}},PM=function(i,t,e){var n,o,r=i.h,s=i.s,l=i.v,a=i.a;if(e)switch(a=(o=(n=a).toString().match(/\.(\d{1,2})(\d*)/))&&o[2].length>0?parseFloat(n.toFixed(2)):n,t){case"hsl":var h=TM(r,s/100,l/100);return"hsla(".concat(r.toFixed(0),", ").concat(Math.round(100*h[1]),"%, ").concat(Math.round(100*h[2]),"%, ").concat(a,")");case"hsv":return"hsva(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%, ").concat(a,")");case"rgb":var d=Fh(r,s,l),u=d.r,c=d.g,g=d.b;return"rgba(".concat(u,", ").concat(c,", ").concat(g,", ").concat(a,")");default:return"".concat(BM(Fh(r,s,l))).concat(Gg(255*a))}else switch(t){case"hsl":var f=TM(r,s/100,l/100);return"hsl(".concat(r.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%)");case"rgb":var p=Fh(r,s,l),m=p.r,v=p.g,C=p.b;return"rgb(".concat(m,", ").concat(v,", ").concat(C,")");default:return BM(Fh(r,s,l))}},Ug=function(i){var t=i.r,e=i.g,n=i.b;t=Fl(t,255),e=Fl(e,255),n=Fl(n,255);var o,r=Math.max(t,e,n),s=Math.min(t,e,n),l=r,a=r-s,h=r===0?0:a/r;if(r===s)o=0;else{switch(r){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4}o/=6}return{h:360*o,s:100*h,v:100*l}},HM=function(i){var t=i.h,e=i.s,n=i.l;n/=100;var o=e/=100,r=Math.max(n,.01);return e*=(n*=2)<=1?n:2-n,o*=r<=1?r:2-r,{h:+t,s:100*(n===0?2*o/(r+o):2*e/(n+e)),v:100*((n+e)/2)}},EM=function(i){var t=[];if(i.match(/^#([0-9a-fA-f]{3,4})$/g))for(var e=1;e<i.length;e++)t.push(parseInt("0x"+i[e].repeat(2)));else if(i.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var n=1;n<i.length;n+=2)t.push(parseInt("0x"+i.slice(n,n+2)));return{r:t[0],g:t[1],b:t[2],a:t[3]}},jv=function(i,t,e){if(typeof i=="string"&&i!==""){var n=Kg(i,Yg(i),e),o=IM(n);return o==null?"":PM(o,t,e)}return""},kM=function(i){var t=Ll(i.match(/(\d(\.\d+)?)+/g),4);return{r:t[0],g:t[1],b:t[2],a:t[3]}},LM=function(i){var t=Ll(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:e,s:parseFloat(n),l:parseFloat(o),a:r}},FM=function(i){var t=Ll(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:parseFloat(e),s:parseFloat(n),v:parseFloat(o),a:parseFloat(r)}},Kg=function(i,t){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(t){case"rgb":var e=kM(i),n=e.r,o=e.g,r=e.b,s=e.a;return Wn(Wn({},Ug({r:n,g:o,b:r})),{},{a:+s});case"hsv":var l=FM(i);return{h:l.h,s:l.s,v:l.v,a:l.a};case"hsl":var a=LM(i),h=a.h,d=a.s,u=a.l,c=a.a;return Wn(Wn({},HM({h,s:d,l:u})),{},{a:+c});default:var g=EM(i),f=g.r,p=g.g,m=g.b,v=g.a;return Wn(Wn({},Ug({r:f,g:p,b:m})),{},{a:v/255})}else switch(t){case"rgb":return Wn(Wn({},Ug(kM(i))),{},{a:1});case"hsv":var C=FM(i);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return Wn(Wn({},HM(LM(i))),{},{a:1});default:return Wn(Wn({},Ug(EM(i))),{},{a:1})}},Yg=function(i){return i.match(/^#/)?"hex":i.match(/^rgb/)?"rgb":i.match(/^hsl/)?"hsl":i.match(/^hsv/)?"hsv":"hex"},IM=function(i){var t=i.h,e=i.s,n=i.v,o=i.a;return isNaN(t)&&isNaN(e)&&isNaN(n)?null:(isNaN(t)&&(t=0),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(o)&&(o=1),{h:t,s:e,v:n,a:o})},Ih=b.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(i){var t=b.ref(),e=b.inject("theme",{theme:"light"}).theme,n=b.computed(function(){return parseFloat((i.width||i.size)+"")}),o=b.computed(function(){return parseFloat((i.height||i.size)+"")}),r=b.computed(function(){return{width:"".concat(b.unref(n),"px"),height:"".concat(b.unref(o),"px"),border:i.border?"1px solid ".concat(b.unref(e)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(i.borderRadius,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(b.unref(e)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var l=t.value.getContext("2d");t.value.width=b.unref(n),t.value.height=b.unref(o);var a=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);l.fillStyle=l.createPattern(a,"repeat"),l.fillRect(0,0,b.unref(n),b.unref(o)),l.fillStyle=i.value,l.fillRect(0,0,b.unref(n),b.unref(o))};return b.watch(function(){return i.value},function(){s()}),b.onMounted(function(){s()}),{canvas:t,colorItemStyle:r}}}),BG=["draggable"];wo(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Ih.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("canvas",{class:"color-item",style:b.normalizeStyle(i.colorItemStyle),ref:"canvas",draggable:i.draggable},null,12,BG)},Ih.__scopeId="data-v-02da71fd",Ih.__file="src/color-item/ColorItem.vue";var Xg=b.defineComponent({name:"Colors",components:{ColorItem:Ih},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(i,t){var e=t.emit;return{onSelectColor:function(n,o){e("change",n,o)},useColors:b.computed(function(){return i.colors.map(function(n){return jv(n,"hex",!0)})})}}}),PG={class:"colors"};function DM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function So(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(e),!0).forEach(function(n){Nv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):DM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}wo(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Xg.render=function(i,t,e,n,o,r){var s=b.resolveComponent("color-item");return b.openBlock(),b.createElementBlock("div",PG,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.useColors,function(l,a){return b.openBlock(),b.createBlock(s,{key:a,class:"color-item",size:16,value:l,border:!1,"border-radius":3,selected:i.selectedIndex===a,onClick:b.withModifiers(function(h){return i.onSelectColor(l,+a)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Xg.__scopeId="data-v-0f8b52a8",Xg.__file="src/picker/Colors.vue";var qg=b.defineComponent({name:"Picker",components:{Colors:Xg,Saturation:Wg,Hue:Ng,Alpha:Vg,InputValue:$g},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}},formatOptions:{type:[Boolean,Array]}},emits:["change","formatChange"],setup:function(i,t){var e=t.emit,n=b.computed(function(){return So(So({},i.style),{},{width:i.showAlpha?"230px":"205px"})}),o=b.ref(),r=b.ref(),s=b.ref(),l=function(){var p,m=(p=i.value)===null||p===void 0?void 0:p.trim();if(m!=null&&m!==""){var v=Yg(m);return IM(Kg(m,v,i.showAlpha))}return null};b.watch(function(){return i.value},function(){i.value!==b.unref(s)&&(o.value=l())},{immediate:!0}),b.watch(function(){return[b.unref(o),i.format]},function(p){var m=Ll(p,2),v=m[0],C=m[1],S="";v!=null?(S=PM(So({},v),i.format,i.showAlpha),r.value=So({},v)):r.value=null,s.value=S;var _=l();JSON.stringify(v)!==JSON.stringify(_)&&JSON.stringify(v)!==JSON.stringify(C)&&e("change",S)},{immediate:!0});var a=b.computed(function(){var p;return((p=b.unref(o))===null||p===void 0?void 0:p.h)||0}),h=b.computed(function(){var p;return((p=b.unref(o))===null||p===void 0?void 0:p.s)||0}),d=b.computed(function(){var p;return((p=b.unref(o))===null||p===void 0?void 0:p.v)||0}),u=b.computed(function(){var p,m;return((p=b.unref(o))===null||p===void 0?void 0:p.a)!=null?(m=b.unref(o))===null||m===void 0?void 0:m.a:1}),c=b.computed(function(){return Fh(b.unref(a),b.unref(h),b.unref(d))}),g=b.computed(function(){return"rgb(".concat(b.unref(c).r,", ").concat(b.unref(c).g,", ").concat(b.unref(c).b,")")}),f=b.ref(-1);return{h:a,s:h,v:d,a:u,rgbStr:g,onSelectSaturation:function(p,m){f.value=-1,b.unref(o)==null?o.value={h:b.unref(a),s:p,v:m,a:b.unref(u)}:o.value=So(So({},b.unref(o)),{},{s:p,v:m})},onSelectHue:function(p){f.value=-1,b.unref(o)==null&&(o.value={h:p,s:b.unref(h),v:b.unref(d),a:b.unref(u)}),o.value=So(So({},b.unref(o)),{},{h:p})},onSelectAlpha:function(p){f.value=-1,b.unref(o)==null?o.value={h:b.unref(a),s:b.unref(h),v:b.unref(d),a:p}:o.value=So(So({},b.unref(o)),{},{a:p})},handleInputFormat:function(p){return i.showAlpha?wM[p]:SM[p]},colorValue:s,pickerStyle:n,onInputChange:function(p){f.value=-1,s.value=p},handleChange:function(){var p,m=(p=b.unref(s))===null||p===void 0?void 0:p.trim();if(m!==""){var v=i.showAlpha,C=Yg(m),S=Kg(m,C,v),_=function(y){var w=y.h,A=y.s,R=y.v,x=y.a;return!(isNaN(w)||isNaN(A)||isNaN(R)||isNaN(x))}(S);_?o.value=S:b.unref(r)!=null?o.value=b.unref(r):s.value=""}else o.value=null},selectColorIndex:f,onSelectColor:function(p,m){if(f.value=m,(p=p.trim())==="")o.value=null;else{var v=Yg(p);v?function(C,S,_){if(C.length!==0){var y=Kg(C,S,_),w=y.h,A=y.s,R=y.v;if(!(isNaN(w)||isNaN(A)||isNaN(R))){var x=1,M=y.a;isNaN(M)||(x=M),o.value={h:w,s:A,v:R,a:x}}}}(p,v,!0):o.value=null}},onFormatChange:function(p){e("formatChange",p)}}}}),HG={class:"picker-inner"},EG={class:"picker-header"};wo(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),qg.render=function(i,t,e,n,o,r){var s=b.resolveComponent("saturation"),l=b.resolveComponent("hue"),a=b.resolveComponent("alpha"),h=b.resolveComponent("input-value"),d=b.resolveComponent("Colors");return b.openBlock(),b.createElementBlock("div",{class:"picker",style:b.normalizeStyle(i.pickerStyle)},[b.createElementVNode("div",HG,[b.createElementVNode("div",EG,[b.createVNode(s,{class:"saturation",hue:i.h,saturation:i.s,value:i.v,onChange:i.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),b.createVNode(l,{class:"hue",hue:i.h,onChange:i.onSelectHue},null,8,["hue","onChange"]),i.showAlpha?(b.openBlock(),b.createBlock(a,{key:0,class:"alpha",alpha:i.a,color:i.rgbStr,onChange:i.onSelectAlpha},null,8,["alpha","color","onChange"])):b.createCommentVNode("v-if",!0)]),b.createVNode(h,{format:i.handleInputFormat(i.format),value:i.colorValue,showAlpha:i.showAlpha,width:i.showAlpha?150:125,formatOptions:i.formatOptions,onChange:i.onInputChange,onBlur:i.handleChange,onEnter:i.handleChange,onFormatChange:i.onFormatChange},null,8,["format","value","showAlpha","width","formatOptions","onChange","onBlur","onEnter","onFormatChange"]),i.colors.length>0?(b.openBlock(),b.createBlock(d,{key:0,class:"colors",colors:i.colors,"selected-index":i.selectColorIndex,onChange:i.onSelectColor},null,8,["colors","selected-index","onChange"])):b.createCommentVNode("v-if",!0)])],4)},qg.__scopeId="data-v-6ceadec6",qg.__file="src/picker/Picker.vue";var Zg=b.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(i){var t=b.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:b.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),lineHeight:"".concat(i.size,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(b.unref(t)==="dark"?"#2681ff":"#1890ff"):""}})}}});wo(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),Zg.render=function(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("svg",{class:"add-color-item",style:b.normalizeStyle(i.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[b.createElementVNode("g",{class:"container"},[b.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},Zg.__scopeId="data-v-ceb1719c",Zg.__file="src/add-color-item/AddColorItem.vue";var Jg=b.defineComponent({name:"ColorPicker",components:{ColorItem:Ih,Picker:qg,AddColorItem:Zg},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean],default:"body"},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}},position:{type:String},placement:{type:String},formatOptions:{type:[Boolean,Array],default:!1}},emits:["change","update:value","update:showPicker","overflowMax","closePicker","formatChange"],setup:function(i,t){var e=t.emit,n=b.ref([]),o=b.computed(function(){return b.unref(n).map(function(x){return jv(x,"hex",i.showAlpha)})}),r=b.ref("hex");b.watch(function(){return i.format},function(){r.value=i.format},{immediate:!0}),b.watch(function(){return i.value},function(){var x=i.value||"",M=Array.isArray(x)?x:[x];n.value=M.map(function(T){return jv(T,b.unref(r),i.showAlpha)})},{immediate:!0});var s=b.ref(void 0),l=b.computed(function(){return b.unref(n)[b.unref(s)]}),a=b.ref(!1);b.watch(function(){return i.showPicker},function(){a.value=i.showPicker},{immediate:!0});var h,d,u=b.ref(null),c=b.ref(null),g=RM(u,c,{defaultStyle:{zIndex:i.zIndex},strategy:i.position,placement:i.placement}).style,f=function(){b.unref(u)==null&&(u.value=b.unref(R)[0]),b.unref(s)==null&&(s.value=0),i.showPicker===void 0?a.value=!0:e("update:showPicker",!0)},p=function(){s.value=void 0,i.showPicker===void 0?a.value=!1:e("update:showPicker",!1),e("closePicker",b.toRaw(Array.isArray(i.value)||i.addColor?b.unref(n):b.unref(n)[0]))},m=b.ref(),v=function(){var x=CM(zg.mark(function M(T){var B,H,k,P;return zg.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(H=T.target,(k=(B=H.dataset)===null||B===void 0?void 0:B.index)!=null&&k!==""){E.next=4;break}return E.abrupt("return");case 4:if(P=+k,b.unref(s)!==P){E.next=7;break}return E.abrupt("return");case 7:b.unref(s)!=null&&b.unref(s)!==P?(p(),h&&clearTimeout(h),h=setTimeout(function(){f(),clearTimeout(h)},100)):f(),s.value=P,u.value=H;case 10:case"end":return E.stop()}},M)}));return function(M){return x.apply(this,arguments)}}(),C=function(){var x=CM(zg.mark(function M(T){var B,H,k,P,E;return zg.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(P=T.target,!(!((B=b.unref(m))!==null&&B!==void 0&&B.isEqualNode(P))&&(!((H=b.unref(m))===null||H===void 0)&&H.contains(P)))){F.next=4;break}return F.abrupt("return");case 4:if(E=(k=b.unref(c))===null||k===void 0?void 0:k.$el,!(E!=null&&E.contains(P))){F.next=8;break}return F.abrupt("return");case 8:d&&clearTimeout(d),d=setTimeout(function(){b.unref(a)&&p()},0);case 10:case"end":return F.stop()}},M)}));return function(M){return x.apply(this,arguments)}}();b.watch(a,function(){b.unref(a)&&(f(),clearTimeout(d))});var S,_=b.ref(i.max>b.unref(n).length),y=b.computed(function(){return typeof i.popupContainer=="string"||kl(i.popupContainer)==="object"&&i.popupContainer!=null?i.popupContainer:"body"}),w=b.computed(function(){return typeof i.popupContainer=="boolean"&&i.popupContainer===!1}),A=b.computed(function(){return i.theme});b.watch(function(){return[i.theme,b.unref(c)]},function(){b.nextTick(function(){var x,M;(x=b.unref(m))===null||x===void 0||x.setAttribute("pick-colors-theme",b.unref(A)),(M=b.unref(c))===null||M===void 0||(M=M.$el)===null||M===void 0||M.setAttribute("pick-colors-theme",b.unref(A))})},{immediate:!0}),b.provide("theme",{theme:A});var R=b.ref([]);return b.onMounted(function(){document.addEventListener("mouseup",C,!1),i.showPicker&&f()}),b.onUnmounted(function(){document.removeEventListener("mouseup",C,!1),h&&(clearTimeout(h),h=null),d&&(clearTimeout(d),d=null)}),{valueList:n,colorItemSelected:function(x){return(i.addColor?b.unref(n).length>0:b.unref(n).length>1)&&b.unref(s)===x},selectedColor:l,selectedIndex:s,isShowPicker:a,addColorItemShow:_,onPickerChange:function(x){var M=b.unref(s),T=b.unref(n).slice(),B=b.unref(n).length;if(M!=null){M>=0?T[M]=x:(s.value=B,T.push(x));var H="";H=Array.isArray(i.value)||i.addColor?T:x,n.value=Array.isArray(H)?H:[H],e("update:value",H),e("change",H,x,M),i.addColor&&B>=i.max&&(_.value=!1,e("overflowMax"))}},colorPicker:m,onColorClick:v,pickerRef:c,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var M=x.target;S=+M.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var M=+x.target.dataset.index,T=CG(b.unref(n)),B=T[S];T.splice(S,1);var H=T.slice(0,M),k=T.splice(M),P=H.concat([B]).concat(k);e("update:value",P),e("change",P,P[S],S)},colorItemsRef:R,pickerStyle:g,values:o,teleportDisabled:w,toPopupContainer:y,formatValue:r,onFormatChange:function(x){r.value=x,e("formatChange",x)}}}});wo(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),Jg.render=function(i,t,e,n,o,r){var s=b.resolveComponent("color-item"),l=b.resolveComponent("add-color-item"),a=b.resolveComponent("picker");return b.openBlock(),b.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:t[0]||(t[0]=b.withModifiers(function(){return i.onColorItemDragStart&&i.onColorItemDragStart.apply(i,arguments)},["stop"])),onDragover:t[1]||(t[1]=b.withModifiers(function(){return i.onColorItemDragOver&&i.onColorItemDragOver.apply(i,arguments)},["prevent","stop"])),onDrop:t[2]||(t[2]=b.withModifiers(function(){return i.onColorItemDrop&&i.onColorItemDrop.apply(i,arguments)},["prevent","stop"])),onClick:t[3]||(t[3]=b.withModifiers(function(){return i.onColorClick&&i.onColorClick.apply(i,arguments)},["stop"]))},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.values,function(h,d){return b.openBlock(),b.createBlock(s,{class:"color-item",key:d,ref_for:!0,ref:function(u){return i.colorItemsRef[d]=u},size:i.size,width:i.width,height:i.height,value:h,selected:i.colorItemSelected(d),"data-index":d,draggable:i.valueList.length>1,format:i.formatValue},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),i.addColor&&i.addColorItemShow?(b.openBlock(),b.createBlock(l,{key:0,class:"add-color-item",ref:"addColorItem",selected:i.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):b.createCommentVNode("v-if",!0),(b.openBlock(),b.createBlock(b.Teleport,{to:i.toPopupContainer,disabled:i.teleportDisabled},[b.createVNode(b.Transition,null,{default:b.withCtx(function(){return[i.isShowPicker?(b.openBlock(),b.createBlock(a,{key:0,class:"picker",style:b.normalizeStyle(i.pickerStyle),ref:"pickerRef",value:i.selectedColor,format:i.formatValue,"show-alpha":i.showAlpha,colors:i.colors,formatOptions:i.formatOptions,onChange:i.onPickerChange,onFormatChange:i.onFormatChange},null,8,["style","value","format","show-alpha","colors","formatOptions","onChange","onFormatChange"])):b.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},Jg.__scopeId="data-v-3c43ade8",Jg.__file="src/ColorPicker.vue";const wY="",kG=b.defineComponent({name:"ColorPick",components:{PickColors:Jg},props:{value:{type:String,default:""}},setup(i,{emit:t}){const e=b.ref(i.value);b.watch(()=>i.value,o=>{e.value=o},{immediate:!0});function n(){t("changeProp",b.unref(e))}return{myValue:e,onChange:n}}}),LG={class:"color-pick"};function FG(i,t,e,n,o,r){const s=b.resolveComponent("a-input"),l=b.resolveComponent("pick-colors");return b.openBlock(),b.createElementBlock("div",LG,[b.createVNode(s,{class:"input",size:"small",value:i.myValue,"onUpdate:value":t[0]||(t[0]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"]),b.createVNode(l,{value:i.myValue,"onUpdate:value":t[1]||(t[1]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"])])}const IG=Ti(kG,[["render",FG],["__scopeId","data-v-99378939"]]),DG=b.defineComponent({name:"Radio",props:{value:{type:String,default:""},options:{type:Array,default(){return[]}}},setup(i,{emit:t}){function e(n){t("changeProp",n.target.value)}return{onChange:e}}});function OG(i,t,e,n,o,r){const s=b.resolveComponent("a-radio-group");return b.openBlock(),b.createBlock(s,{value:i.value,size:"small",onChange:i.onChange,options:i.options,optionType:"button"},null,8,["value","onChange","options"])}const zG=Ti(DG,[["render",OG]]),SY="",WG=b.defineComponent({name:"PropertyConfig",components:{ColorPick:IG,Radio:zG},props:{config:{type:Object,default(){return{}}},selectedIndex:{type:Boolean},theme:{type:String,default:"light"}},setup(i){const t=[{label:"字体颜色",key:"color",component:"color-pick"},{label:"对齐方式",key:"align",component:"radio",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},{label:"图标",key:"icon",component:"radio",props:{options:[{label:"上涨",value:"increase"},{label:"下跌",value:"decline"}]}},{label:"图标颜色",key:"iconColor",component:"color-pick"}],e=b.ref([]);b.watch(()=>i.selectedIndex,()=>{if(i.selectedIndex>-1){const s=Object.keys(i.config);e.value=s}});function n(s,l){i.config[s]=l}function o(s,l){if(s.target.checked)i.config[l]="",b.unref(e).push(l);else{delete i.config[l];const a=b.unref(e).indexOf(l);b.unref(e).splice(a,1)}}const r=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":"");return{formConfig:t,handleSelect:o,selectedProperty:e,onChange:n,fontColor:r}}}),NG={class:"content"},VG={class:"list"};function jG(i,t,e,n,o,r){const s=b.resolveComponent("a-checkbox");return b.openBlock(),b.createElementBlock("div",NG,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor,height:"32px",lineHeight:"32px"})},"属性配置",4),b.createElementVNode("div",VG,[i.selectedIndex>-1?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(i.formConfig,({label:l,component:a,props:h,key:d},u)=>(b.openBlock(),b.createElementBlock("div",{class:"list-item",style:{display:"flex"},key:u},[b.createVNode(s,{checked:i.selectedProperty.includes(d),onChange:c=>i.handleSelect(c,d)},null,8,["checked","onChange"]),b.createElementVNode("span",{style:b.normalizeStyle({padding:"0 8px",color:i.fontColor})},b.toDisplayString(l),5),i.selectedProperty.includes(d)?(b.openBlock(),b.createBlock(b.resolveDynamicComponent(a),b.mergeProps({key:0,value:i.config[d],ref_for:!0},h,{onChangeProp:c=>i.onChange(d,c)}),null,16,["value","onChangeProp"])):b.createCommentVNode("",!0)]))),128)):b.createCommentVNode("",!0)])])}const $G=Ti(WG,[["render",jG],["__scopeId","data-v-285d450e"]]),GG=b.defineComponent({name:"ConditionalProperty",props:{theme:{type:String,default:"light"}},components:{ConditionalItemConfig:r$,ConditionalConfig:c$,PropertyConfig:$G},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref([]),r=b.ref(-1);let s="";const l=b.computed(()=>b.unref(r)>-1?b.unref(o)[b.unref(r)]:{});function a(c,g=[]){s=c,o.value=g,n.value=!0}function h(c){r.value=c}function d(){t("change",s,b.unref(o)),r.value=-1,n.value=!1}function u(){r.value=-1,o.value=[]}return b.watch(n,c=>{window.modalShow&&window.modalShow(c)}),e({showModal:a}),{visible:n,config:o,changeSelectedItem:h,selectedConfig:l,selectedIndex:r,handleOk:d,handleClear:u}}}),UG={style:{display:"flex"}};function KG(i,t,e,n,o,r){const s=b.resolveComponent("conditional-item-config"),l=b.resolveComponent("conditional-config"),a=b.resolveComponent("property-config"),h=b.resolveComponent("a-button"),d=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(d,{wrapClassName:i.theme,title:"条件属性",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.visible=u),"ok-text":"确认","cancel-text":"取消",style:{width:"950px",top:"60px",height:"700px"},maskClosable:!1,destroyOnClose:!0,onOk:i.handleOk},{footer:b.withCtx(()=>[b.createVNode(h,{onClick:t[0]||(t[0]=u=>i.visible=!1)},{default:b.withCtx(()=>t[2]||(t[2]=[b.createTextVNode("取消")])),_:1}),b.createVNode(h,{onClick:i.handleClear},{default:b.withCtx(()=>t[3]||(t[3]=[b.createTextVNode("清除筛选")])),_:1},8,["onClick"]),b.createVNode(h,{type:"primary",onClick:i.handleOk},{default:b.withCtx(()=>t[4]||(t[4]=[b.createTextVNode("确定")])),_:1},8,["onClick"])]),default:b.withCtx(()=>[b.createElementVNode("div",UG,[b.createVNode(s,{config:i.config,theme:i.theme,onChange:i.changeSelectedItem},null,8,["config","theme","onChange"]),b.createVNode(l,{config:i.selectedConfig.conditions,theme:i.theme,isSelected:i.selectedIndex>-1},null,8,["config","theme","isSelected"]),b.createVNode(a,{config:i.selectedConfig,selectedIndex:i.selectedIndex,theme:i.theme},null,8,["config","selectedIndex","theme"])])]),_:1},8,["wrapClassName","visible","onOk"])}const YG=Ti(GG,[["render",KG]]),xY="",XG=b.defineComponent({name:"PivotChart",props:{data:{type:Object,default(){return{dimensionData:{},xLabel:"",yLabel:""}}},theme:{type:String,default:"light"}},components:{FilterOutlined:zT,MinusSquareOutlined:Dj,PivotFilter:cT},setup(i,{expose:t}){const e=b.ref();let n;const o=b.ref([]),r=b.computed(()=>{var k;return(k=b.unref(o)[b.unref(o).length-1])==null?void 0:k.key}),s=b.ref([]),l=b.ref(!1),a=b.ref(),h=b.ref({});let d={};const u=b.reactive({position:"absolute",top:"0",left:"0"});let c="",g;function f(){s.value=[],o.value=[],d={};const{dimensionData:k,xLabel:P}=i.data,E=k[P].map(F=>F.value);m(P,E),b.unref(o).push({key:P,drillValue:"",xAxisData:E}),v()}let p=[];b.onMounted(()=>{n=hB.init(e.value),S()});function m(k,P){const{yLabel:E,records:F}=i.data;let I=[];P.forEach(()=>{I.push(0)}),F.forEach(L=>{if(L[E]!==void 0){const D=P.indexOf(L[k]);if(D>-1){let O=!0;b.unref(o).forEach(W=>{W.drillValue&&L[W.key]!==W.drillValue&&(O=!1)});const V=Number(L[E]);O&&!isNaN(V)&&(I[D]+=Number(V))}}}),I=I.map(L=>L.toFixed(2)),g={tooltip:{},xAxis:{data:P},yAxis:{},series:[{name:E,type:"bar",label:{show:!0,position:"top"},data:I}]},p=I,n.setOption(g)}function v(){const k=Object.keys(i.data.dimensionData),P=b.unref(o).map(F=>F.key),E=[];k.forEach(F=>{P.includes(F)||E.push(F)}),s.value=E}function C(){c="",l.value=!1}function S(){n.on("contextmenu",function(k){const{event:{event:P},name:E}=k;c=E,P.preventDefault(),u.left=P.offsetX+90+"px",u.top=P.offsetY+80+"px",l.value=!0}),document.addEventListener("click",C)}function _(k){const P=[],{records:E}=i.data;for(const F of E){let I=!0;for(const L of b.unref(o))L.drillValue&&F[L.key]!==L.drillValue&&(I=!1);I&&!P.includes(F[k])&&P.push(F[k])}return P}function y(k){b.unref(o)[b.unref(o).length-1].drillValue=c;const P=_(k);m(k,P),b.unref(o).push({key:k,drillValue:"",xAxisData:P}),v()}function w(k,P){b.unref(o).splice(k+1,b.unref(o).length-k-1),b.unref(o)[k].drillValue="";const E=_(P);m(P,E),T(),v()}function A(k,P){const E=g.series[0].data,F=g.xAxis.data,I=E.map((D,O)=>({value:D,label:F[O]}));let L;P==="asc"?k==="dimension"?L=I.sort((D,O)=>D.label.localeCompare(O.label)):L=I.sort((D,O)=>D.value-O.value):P==="desc"&&(k==="dimension"?L=I.sort((D,O)=>O.label.localeCompare(D.label)):L=I.sort((D,O)=>O.value-D.value)),g.series[0].data=L.map(D=>D.value),g.xAxis.data=L.map(D=>D.label),n.setOption(g)}function R(k){if(k==="dimension"){const P=_(b.unref(r));m(b.unref(r),P),T()}else d={},T()}function x(k){if(k==="dimension"){const P=b.unref(o)[b.unref(o).length-1].xAxisData.map(E=>({value:E}));h.value={fieldName:b.unref(r),key:b.unref(r),type:k,filterData:g.xAxis.data,valueList:P}}else k==="indicators"&&(h.value={fieldName:i.data.yLabel,key:i.data.yLabel,type:"indicators",filterData:d});b.nextTick(()=>{a.value.show()})}function M({checkKeys:k,type:P}){P==="dimension"?m(b.unref(r),k):P==="indicators"&&(d=k,T())}function T(){const k=b.unref(o)[b.unref(o).length-1].xAxisData;let P=p.map((E,F)=>({value:E,label:k[F]}));P=P.filter(E=>B(E.value)),g.series[0].data=P.map(E=>E.value),g.xAxis.data=P.map(E=>E.label),n.setOption(g)}function B(k){let P=!1,{rule:E,value:F}=d;switch(F=Number(F),E){case"LESS":P=k<F;break;case"GREATER":P=k>F;break;case"EQUAL":P=k===F;break;case"NOT_EQUAL":P=k!==F;break;default:P=!0;break}return P}b.onBeforeUnmount(()=>{document.removeEventListener("click",C)}),t({init:f});const H=b.computed(()=>i.theme==="darkBlue"?"#b2c3dd":"");return{echartRef:e,dropdownList:s,isShowMenu:l,curXLabel:r,menuStyle:u,drillDimension:y,dimensionMap:o,deleteDimension:w,handleSort:A,handleClear:R,handleFilter:x,pivotFilterRef:a,filterData:h,onFilterChange:M,fontColor:H}}}),qG={style:{display:"flex",height:"400px"}},ZG={style:{flex:"0 0 200px"}},JG={style:{flex:"0 0 650px",height:"100%"}},QG={key:0,style:{display:"flex","align-items":"center"}},tU={key:0,class:"dimension-item"},eU={key:1,style:{height:"30px"}},iU={style:{width:"100%",height:"100%"},ref:"echartRef"},nU=["onClick"];function oU(i,t,e,n,o,r){const s=b.resolveComponent("filter-outlined"),l=b.resolveComponent("a-menu-item"),a=b.resolveComponent("a-menu"),h=b.resolveComponent("a-dropdown"),d=b.resolveComponent("minus-square-outlined"),u=b.resolveComponent("pivot-filter");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",qG,[b.createElementVNode("div",ZG,[b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},[b.createTextVNode(" 横轴:"+b.toDisplayString(i.curXLabel)+" ",1),b.createVNode(h,null,{overlay:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{key:"asc",onClick:t[0]||(t[0]=c=>i.handleSort("dimension","asc"))},{default:b.withCtx(()=>t[8]||(t[8]=[b.createTextVNode("升序")])),_:1}),b.createVNode(l,{key:"desc",onClick:t[1]||(t[1]=c=>i.handleSort("dimension","desc"))},{default:b.withCtx(()=>t[9]||(t[9]=[b.createTextVNode("降序")])),_:1}),b.createVNode(l,{key:"filter",onClick:t[2]||(t[2]=c=>i.handleFilter("dimension"))},{default:b.withCtx(()=>t[10]||(t[10]=[b.createTextVNode("筛选")])),_:1}),b.createVNode(l,{key:"clear",onClick:t[3]||(t[3]=c=>i.handleClear("dimension"))},{default:b.withCtx(()=>t[11]||(t[11]=[b.createTextVNode("清除")])),_:1})]),_:1})]),default:b.withCtx(()=>[b.createVNode(s,{class:"filter-icon",style:b.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4),b.createElementVNode("div",{style:b.normalizeStyle({color:i.fontColor})},[b.createTextVNode(" 纵轴:"+b.toDisplayString(i.data.yLabel)+" ",1),b.createVNode(h,null,{overlay:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{key:"asc",onClick:t[4]||(t[4]=c=>i.handleSort("indicators","asc"))},{default:b.withCtx(()=>t[12]||(t[12]=[b.createTextVNode("升序")])),_:1}),b.createVNode(l,{key:"desc",onClick:t[5]||(t[5]=c=>i.handleSort("indicators","desc"))},{default:b.withCtx(()=>t[13]||(t[13]=[b.createTextVNode("降序")])),_:1}),b.createVNode(l,{key:"filter",onClick:t[6]||(t[6]=c=>i.handleFilter("indicators"))},{default:b.withCtx(()=>t[14]||(t[14]=[b.createTextVNode("筛选")])),_:1}),b.createVNode(l,{key:"clear",onClick:t[7]||(t[7]=c=>i.handleClear("indicators"))},{default:b.withCtx(()=>t[15]||(t[15]=[b.createTextVNode("清除")])),_:1})]),_:1})]),default:b.withCtx(()=>[b.createVNode(s,{class:"filter-icon",style:b.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4)]),b.createElementVNode("div",JG,[i.dimensionMap.length>1?(b.openBlock(),b.createElementBlock("div",QG,[b.createElementVNode("span",{style:b.normalizeStyle({color:i.fontColor})},"钻取维度:",4),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dimensionMap,(c,g)=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:g},[c.drillValue?(b.openBlock(),b.createElementBlock("div",tU,[b.createVNode(d,{class:"dimension-icon",onClick:f=>i.deleteDimension(g,c.key)},null,8,["onClick"]),b.createTextVNode(b.toDisplayString(c.key)+"("+b.toDisplayString(c.drillValue)+") ",1)])):b.createCommentVNode("",!0)],64))),128))])):(b.openBlock(),b.createElementBlock("div",eU)),b.createElementVNode("div",iU,null,512)]),b.withDirectives(b.createElementVNode("div",{style:b.normalizeStyle(i.menuStyle),class:"dropdown-menu"},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dropdownList,c=>(b.openBlock(),b.createElementBlock("div",{class:"item",key:c,onClick:g=>i.drillDimension(c)},"下钻"+b.toDisplayString(c),9,nU))),128))],4),[[b.vShow,i.isShowMenu]])]),b.createVNode(u,{ref:"pivotFilterRef",theme:i.theme,data:i.filterData,onChange:i.onFilterChange},null,8,["theme","data","onChange"])],64)}const rU=Ti(XG,[["render",oU],["__scopeId","data-v-fd1263c8"]]),sU=b.defineComponent({components:{PivotChart:rU},name:"ChartModal",props:{theme:{type:String,default:"light"}},setup(i,{expose:t}){const e=b.ref(!1),n=b.ref({}),o=b.ref();function r(s){n.value=s,e.value=!0,b.nextTick(()=>{o.value.init()})}return b.watch(e,s=>{window.modalShow&&window.modalShow(s)}),t({showModal:r}),{visible:e,chartOptions:n,chartRef:o}}});function lU(i,t,e,n,o,r){const s=b.resolveComponent("pivot-chart"),l=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(l,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=a=>i.visible=a),"ok-text":"确认","cancel-text":"取消",title:"图形",style:{width:"900px"},destroyOnClose:!0,onOk:t[1]||(t[1]=a=>i.visible=!1)},{default:b.withCtx(()=>[b.createVNode(s,{data:i.chartOptions,theme:i.theme,ref:"chartRef"},null,8,["data","theme"])]),_:1},8,["wrapClassName","visible"])}const aU=Ti(sU,[["render",lU]]),hU=b.defineComponent({name:"PivotAggregate",props:{theme:{type:String,default:"light"}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref([]),r=b.ref(""),s=[{label:"合计",value:"SUM"},{label:"平均值",value:"AVG"},{label:"计数",value:"COUNT"},{label:"最大值",value:"MAX"},{label:"最小值",value:"MIN"},{label:"方差",value:"VAR"},{label:"标准差",value:"STDEV"}];function l(){t("confirm",b.unref(o),r.value),n.value=!1}function a(d,u){o.value=Qe.cloneDeep(d),r.value=u,n.value=!0}const h=()=>document.getElementsByClassName("aggregate-modal")[0]||document.body;return b.watch(n,d=>{window.modalShow&&window.modalShow(d)}),e({showModal:a}),{visible:n,aggregationType:o,options:s,dimensionKey:r,handleOk:l,getPopupContainer:h}}});function dU(i,t,e,n,o,r){const s=b.resolveComponent("a-select"),l=b.resolveComponent("a-form-item"),a=b.resolveComponent("a-form"),h=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(h,{wrapClassName:i.theme+" aggregate-modal",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:i.dimensionKey+"-聚合",destroyOnClose:!1,maskClosable:!1,onOk:i.handleOk,onCancel:t[2]||(t[2]=d=>i.visible=!1)},{default:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{label:"聚合方式"},{default:b.withCtx(()=>[b.createVNode(s,{value:i.aggregationType,"onUpdate:value":t[0]||(t[0]=d=>i.aggregationType=d),allowClear:"",options:i.options,mode:"multiple",getPopupContainer:i.getPopupContainer},null,8,["value","options","getPopupContainer"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])}const uU=Ti(hU,[["render",dU]]),cU=b.defineComponent({name:"PivotTop",props:{theme:{type:String,default:"light"}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(""),r=b.ref("");function s(){t("confirm",{value:b.unref(o),key:b.unref(r)}),n.value=!1}function l(a){const{value:h,key:d}=a;o.value=h,n.value=!0,r.value=d}return b.watch(n,a=>{window.modalShow&&window.modalShow(a)}),e({showModal:l}),{visible:n,topNum:o,handleOk:s}}});function gU(i,t,e,n,o,r){const s=b.resolveComponent("a-input"),l=b.resolveComponent("a-form-item"),a=b.resolveComponent("a-form"),h=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(h,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:"维度取Top",destroyOnClose:!0,onOk:i.handleOk},{default:b.withCtx(()=>[b.createVNode(a,null,{default:b.withCtx(()=>[b.createVNode(l,{label:"维度取Top"},{default:b.withCtx(()=>[b.createVNode(s,{value:i.topNum,"onUpdate:value":t[0]||(t[0]=d=>i.topNum=d),type:"number",style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","onOk"])}const fU=Ti(cU,[["render",gU]]);let Dh=(i=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(i));for(;i--;){let n=e[i]&63;n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n<63?t+="_":t+="-"}return t};const RY="",pU=b.defineComponent({name:"PivotDetail",components:{ATable:Ii.Table},props:{theme:{type:String,default:"light"},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""}},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(!1),r=b.ref([]),s=b.ref([]),l=b.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showTotal:d=>`共 ${d} 条数据`});async function a(d){var C;o.value=!0,n.value=!0;const{args:u={},dimension:c,indicator:g,splitSymbol:f}=d,{originData:p=[],cellHeaderPaths:{colHeaderPaths:m=[],rowHeaderPaths:v=[]}}=u;if(p!=null&&p.length){const S=p[0],_=m!=null&&m.length?m[m.length-1]:"",y=m.filter(T=>T.dimensionKey).concat(v.filter(T=>T.dimensionKey)).map(T=>T.dimensionKey);if(!(_!=null&&_.indicatorKey)||!y.length)return;const w=g.find(T=>T.label===_.indicatorKey),A={};for(const T of c)if(y.includes(T.label)){const H=(S[T.label]||"").split(f)||[];A[T.typeGuid]=H!=null&&H.length?H[H.length-1]:""}const R=await vs.post(`${i.indicatorUrl}/diagram/obtainDataSetData`,{pageId:i.pageId,indexCode:(w==null?void 0:w.indexCode)||"",param:A},{headers:{Authentication:i.indicatorToken,operateContext:i.context}}),{columns:x=[],data:M=[]}=((C=R==null?void 0:R.data)==null?void 0:C.data)||{};r.value=x.filter(T=>T).map(T=>({title:T,dataIndex:T})),s.value=M.map(T=>({...T,uid:Dh(6)}))}o.value=!1}b.watch(n,d=>{window.modalShow&&window.modalShow(d)});const h=d=>{b.unref(l).current=d.current};return e({showModal:a}),{visible:n,loading:o,pagination:l,columns:r,dataSource:s,handleTableChange:h}}}),mU={key:0,class:"spin-container"};function vU(i,t,e,n,o,r){const s=b.resolveComponent("a-spin"),l=b.resolveComponent("a-table"),a=b.resolveComponent("a-modal");return b.openBlock(),b.createBlock(a,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=h=>i.visible=h),width:"40%",title:"指标明细",destroyOnClose:!0,footer:null,bodyStyle:{maxHeight:"50vh",overflow:"auto"}},{default:b.withCtx(()=>[i.loading?(b.openBlock(),b.createElementBlock("div",mU,[b.createVNode(s,{size:"large"})])):b.createCommentVNode("",!0),i.loading?b.createCommentVNode("",!0):(b.openBlock(),b.createBlock(l,{key:1,"row-key":h=>h.uid,columns:i.columns,"data-source":i.dataSource,pagination:i.pagination,onChange:i.handleTableChange},null,8,["row-key","columns","data-source","pagination","onChange"]))]),_:1},8,["wrapClassName","visible"])}const bU=Ti(pU,[["render",vU],["__scopeId","data-v-bedfbe83"]]),CU=(i,t)=>{i.register.icon("sortDown",{name:"sortDown",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"取消排序",placement:"top"}}),i.register.icon("sortUp",{name:"sortUp",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击降序",placement:"top"}}),i.register.icon("sortNormal",{name:"sortNormal",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击升序",placement:"top"}})},yU=b.defineComponent({props:{node:{type:[Object,String],required:!0}},render(){return this.node}}),_U={mounted(i){i.focus()}},wU=b.defineComponent({name:"PivotConfig",directives:{focus:_U},props:{theme:{type:String,default:"light"},fullMode:{type:Boolean,default:!1},pageId:{type:String,default:""}},components:{VNodeRender:yU,draggable:ab,DeleteOutlined:DT},setup(i,{emit:t,expose:e}){const n=b.ref(!1),o=b.ref(),r=b.ref([]),s=b.ref([{title:"行维度",icon:b.createVNode(Aj),fields:[]},{title:"列维度",icon:b.createVNode(wj),fields:[]},{title:"指标",icon:b.createVNode(Jj),fields:[]}]),l=(y=[],w=[])=>{for(const A of b.unref(s))A.fields=[];for(const A of y)A.positionType==="rows"?b.unref(s)[0].fields.push(Qe.cloneDeep(A)):A.positionType==="columns"&&b.unref(s)[1].fields.push(Qe.cloneDeep(A));b.unref(s)[2].fields=Qe.cloneDeep(w),n.value=!0},a=b.computed(()=>[...b.unref(s)[0].fields.map(y=>({...y,label:y.showTitle,positionType:"rows"})),...b.unref(s)[1].fields.map(y=>({...y,label:y.showTitle,positionType:"columns"}))]),h=b.computed(()=>b.unref(s)[2].fields),d=()=>{r.value=[],t("confirm",b.unref(a),b.unref(h)),n.value=!1},u=(y,w)=>{const A=w[y.oldIndex],{scope:R}=A;["IDX","BUILT_IN_IDX"].includes(R)?r.value=[0,1]:["DIM","BUILT_IN_DIM"].includes(R)&&(r.value=[2])},c=()=>{r.value=[]},g=()=>{s.value=Qe.cloneDeep(b.unref(s))},f=(y,w)=>{b.unref(s)[y].fields.splice(w,1)},p=b.ref(),m=b.ref(),v=b.ref(""),C=(y,w)=>{i.fullMode&&(p.value=`${y}_${w}`,m.value=Qe.cloneDeep(b.unref(s)[y].fields[w]))},S=()=>{if(b.unref(v)){const y=b.unref(p).split("_");Ii.message.error(b.unref(v)),b.unref(s)[y[0]].fields[y[1]].showTitle=b.unref(m).showTitle,v.value=""}p.value=""},_=y=>{const w=y.target.value,A=b.unref(a).concat(b.unref(h));w?A.find(x=>x.name!==b.unref(m).name&&x.showTitle===w)&&(v.value="名称不能重复"):v.value="不能为空"};return b.watch(n,y=>{window.modalShow&&window.modalShow(y)}),e({showModal:l}),{visible:n,fieldAreas:s,indSourceRef:o,maskList:r,currentEditItem:p,handleOk:d,onDragAreaStart:u,onDragEnd:c,handleDeleteField:f,handleEdit:C,onConfirmLabel:S,onDragAdd:g,onChangeLabel:_}}}),AY="",SU={class:"config-wrap"},xU={class:"area-content"},RU={class:"area-title"},AU={class:"field-item"},TU=["onClick"];function MU(i,t,e,n,o,r){const s=b.resolveComponent("v-node-render"),l=b.resolveComponent("a-input"),a=b.resolveComponent("delete-outlined"),h=b.resolveComponent("draggable"),d=b.resolveComponent("a-button"),u=b.resolveComponent("a-modal"),c=b.resolveDirective("focus");return b.openBlock(),b.createBlock(u,{wrapClassName:`${i.theme}`,title:"设置",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",maskClosable:!1,destroyOnClose:!1,style:{width:"500px"},bodyStyle:{padding:0},onOk:i.handleOk},{footer:b.withCtx(()=>[b.createVNode(d,{onClick:t[0]||(t[0]=g=>i.visible=!1)},{default:b.withCtx(()=>t[2]||(t[2]=[b.createTextVNode("取消")])),_:1}),b.createVNode(d,{type:"primary",onClick:i.handleOk},{default:b.withCtx(()=>t[3]||(t[3]=[b.createTextVNode("确定")])),_:1},8,["onClick"])]),default:b.withCtx(()=>[b.createElementVNode("div",SU,[b.createElementVNode("div",xU,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.fieldAreas,(g,f)=>(b.openBlock(),b.createElementBlock("div",{class:"area-item",key:f},[b.createElementVNode("div",RU,[b.createVNode(s,{class:"area-icon",node:g.icon},null,8,["node"]),b.createTextVNode(" "+b.toDisplayString(g.title),1)]),b.createVNode(h,{class:"area-list",list:g.fields,"item-key":"index",group:{name:"diGroup"},disabled:i.maskList.includes(f),onStart:p=>i.onDragAreaStart(p,g.fields),onEnd:i.onDragEnd,onAdd:i.onDragAdd},{item:b.withCtx(({index:p,element:m})=>[b.createElementVNode("div",AU,[i.currentEditItem===`${f}_${p}`?b.withDirectives((b.openBlock(),b.createBlock(l,{key:0,size:"small",value:m.showTitle,"onUpdate:value":v=>m.showTitle=v,onPressEnter:i.onConfirmLabel,onBlur:i.onConfirmLabel,onChange:i.onChangeLabel},null,8,["value","onUpdate:value","onPressEnter","onBlur","onChange"])),[[c]]):(b.openBlock(),b.createElementBlock("div",{key:1,style:{width:"100%"},onClick:v=>i.handleEdit(f,p)},b.toDisplayString(m.showTitle),9,TU)),i.fullMode?(b.openBlock(),b.createBlock(a,{key:2,style:{color:"red","padding-left":"8px"},onClick:v=>i.handleDeleteField(f,p)},null,8,["onClick"])):b.createCommentVNode("",!0)])]),_:2},1032,["list","disabled","onStart","onEnd","onAdd"])]))),128))])])]),_:1},8,["wrapClassName","visible","onOk"])}const BU=Ti(wU,[["render",MU],["__scopeId","data-v-7cedd0ba"]]),PU=b.defineComponent({name:"IndSourceList",components:{CaretRightOutlined:rj,CaretDownOutlined:ej,LoadingOutlined:Pj,Draggable:ab},props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},isSub:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},pageId:{type:String,default:""}},setup(i,{emit:t,expose:e}){const n=b.inject("indicatorUrl",""),o=b.inject("indicatorToken",""),r=b.inject("setItemDisabled",y=>!1),s=b.ref([]),l=b.ref(),a=b.reactive({pageSize:20,currentPage:1,totalResult:0}),h=b.ref(!1),d=b.ref(""),u=b.ref(!1);b.watch(()=>i.data,y=>{i.isSub&&(y==null||y.forEach(w=>{var A;w!=null&&w.isLeaf||(A=w.dataViewColumns)==null||A.forEach(R=>{R.show=!0,R.edit=!1,R.title&&(R.label=R.title)})}),s.value=y)},{deep:!0,immediate:!0});const c=()=>{var y;i.isSub||(y=b.unref(l))==null||y.removeEventListener("scroll",C)},g=async y=>{var A;if(b.unref(h))return;h.value=!0;const w={source:i.config.source||"INDICATOR_LIB",pageId:i.pageId,dataSourceId:i.config.dataSourceId||"",indexName:d.value};y?(y.loading=!0,w.indexTypeGuid=y.indexTypeGuid,w.isLeaf=y.isLeaf):a&&(w.queryRequest={pageSize:a.pageSize,pageNum:a.currentPage});try{const R=await vs.post(`${b.unref(n)}/diagram/sourceList`,w,{headers:{Authentication:o,operateContext:"ygt"}}),{success:x,data:M={}}=R.data;if(x){const{rows:T=[],total:B=0}=M;T==null||T.forEach(H=>{var k;(y==null?void 0:y.isLeaf)==="1"?(k=H.dataViewColumns)==null||k.forEach(P=>{P.show=!0,P.edit=!1,P.title&&(P.label=P.title)}):H.show=!1}),y?(y.children=T,y.show=!0,T!=null&&T.length||(y.noData=!0)):(s.value=b.unref(s).concat(T),a.totalResult=+B,((A=b.unref(s))==null?void 0:A.length)>=B&&c())}y&&(y.loading=!1),h.value=!1}catch{y&&(y.loading=!1),h.value=!1}},f=async y=>{const w=s.value[y],{children:A=[]}=w;A!=null&&A.length?w.show=!w.show:!w.noData&&w.isLeaf?g(w):w.noData&&(w.show=!w.show)},p=(y,w)=>{t("onDragStart",y,w)},m=()=>{t("onDragEnd")},v=y=>{y.show=!y.show},C=y=>{y.target.scrollTop+y.target.clientHeight+20>=y.target.scrollHeight&&(a.currentPage++,g())},S=async()=>{await g(),b.nextTick(async()=>{b.unref(l).scrollHeight===b.unref(l).clientHeight&&a.totalResult>b.unref(s).length&&(a.currentPage++,S())})},_=async y=>{var w;c(),u.value=!0,a.currentPage=1,a.totalResult=0,s.value=[],d.value=y,await S(),u.value=!1,(w=b.unref(l))==null||w.addEventListener("scroll",C)};return b.onMounted(async()=>{var y;i.isSub||(S(),(y=b.unref(l))==null||y.addEventListener("scroll",C))}),b.onUnmounted(()=>{c()}),e({handleSearch:_}),{columnRef:l,sourceList:s,searchLoading:u,onToggleGroup:f,onToggleSource:v,setItemDisabled:r,onDragStart:p,onDragEnd:m,mapDataSetScope:bP,mapScope:vP,getLoadType:CP,getUseType:yP,getSourceType:_P}}}),TY="",HU={key:0,class:"no-data"},EU={class:"column-item"},kU=["onClick"],LU={key:3,class:"item-name"},FU={class:"column-item"},IU={key:0},DU={key:1},OU={key:2},zU={key:3},WU=["onClick"],NU={class:"item-name"},VU={class:"column-child-item"},jU={class:"field"},$U={class:"column-child-item-name"};function GU(i,t,e,n,o,r){const s=b.resolveComponent("loading-outlined"),l=b.resolveComponent("caret-down-outlined"),a=b.resolveComponent("caret-right-outlined"),h=b.resolveComponent("ind-source-list",!0),d=b.resolveComponent("a-tooltip"),u=b.resolveComponent("draggable"),c=b.resolveComponent("a-spin");return b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["columns",i.isSub?"sub-columns":""]),ref:"columnRef"},[b.createVNode(c,{spinning:i.searchLoading,tip:"数据源加载中..."},{default:b.withCtx(()=>{var g;return[!((g=i.sourceList)!=null&&g.length)&&!i.searchLoading?(b.openBlock(),b.createElementBlock("div",HU,"暂无数据")):i.hasChildren?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:1},b.renderList(i.sourceList,(f,p)=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:f.indexTypeGuid||f.id},[b.createElementVNode("div",EU,[b.createElementVNode("span",{class:"item-group",onClick:m=>i.onToggleGroup(p)},[f.loading?(b.openBlock(),b.createBlock(s,{key:0})):f.show?(b.openBlock(),b.createBlock(l,{key:1})):(b.openBlock(),b.createBlock(a,{key:2})),f.isLeaf?(b.openBlock(),b.createElementBlock("span",LU,b.toDisplayString(f.indexTypeCode+"."+f.indexTypeName),1)):b.createCommentVNode("",!0)],8,kU)]),f.show?(b.openBlock(),b.createBlock(h,{key:0,data:f.children,isSub:!0,hasChildren:f.isLeaf==="0",pageId:i.pageId,config:i.config,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd},null,8,["data","hasChildren","pageId","config","onOnDragStart","onOnDragEnd"])):b.createCommentVNode("",!0)],64))),128)):(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:2},b.renderList(i.sourceList,f=>(b.openBlock(),b.createElementBlock("div",{key:f.id,class:b.normalizeClass(i.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[b.createElementVNode("div",FU,[b.createVNode(d,null,{title:b.withCtx(()=>[b.createElementVNode("div",null,"加载类型:"+b.toDisplayString(i.getLoadType(f.loadType)),1),f.useType?(b.openBlock(),b.createElementBlock("div",IU,"数据使用系统:"+b.toDisplayString(i.getUseType(f.useType)),1)):b.createCommentVNode("",!0),f.systemSource?(b.openBlock(),b.createElementBlock("div",DU,"制度出处:"+b.toDisplayString(f.systemSource),1)):b.createCommentVNode("",!0),f.dataTo?(b.openBlock(),b.createElementBlock("div",OU,"数据来源:"+b.toDisplayString(i.getSourceType(f.dataTo)),1)):b.createCommentVNode("",!0),f.meaning?(b.openBlock(),b.createElementBlock("div",zU,"指标含义:"+b.toDisplayString(f.meaning),1)):b.createCommentVNode("",!0)]),default:b.withCtx(()=>[b.createElementVNode("span",{class:"item-group",onClick:p=>i.onToggleSource(f)},[f.show?(b.openBlock(),b.createBlock(l,{key:0})):(b.openBlock(),b.createBlock(a,{key:1})),b.createElementVNode("span",NU,b.toDisplayString((f.indexCode?f.indexCode:"")+" "+f.name),1)],8,WU)]),_:2},1024)]),f.show?(b.openBlock(),b.createBlock(u,{key:0,modelValue:f.dataViewColumns,"onUpdate:modelValue":p=>f.dataViewColumns=p,group:{name:"diGroup",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:i.setItemDisabled(f.dataViewColumns),filter:".not-allow",onStart:p=>i.onDragStart(p,f),onEnd:i.onDragEnd},{item:b.withCtx(({element:p})=>[b.createElementVNode("div",VU,[b.createElementVNode("span",jU,"【"+b.toDisplayString(p.scope==="FIELD"?i.mapDataSetScope(p.genericType):i.mapScope(p.scope))+"】",1),b.createElementVNode("span",$U,b.toDisplayString(p.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart","onEnd"])):b.createCommentVNode("",!0)],2))),128))]}),_:1},8,["spinning"])],2)}const UU=Ti(PU,[["render",GU],["__scopeId","data-v-808d9a27"]]),KU=b.defineComponent({name:"DragArea",props:{style:{type:Object,default:()=>({})},maskList:{type:Array,default:()=>[]}},setup(i,{emit:t}){return{onDragOver:s=>{s.preventDefault(),s.target.classList.add("highlight")},onDragLeave:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDragEnd:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDrop:s=>{s.preventDefault(),s.target.classList.remove("highlight");const l=Array.from(s.target.classList);l.includes("rows")?t("add","rows"):l.includes("columns")?t("add","columns"):l.includes("indicators")?t("add","indicators"):l.includes("filters")&&t("add","filters")}}}}),MY="";function YU(i,t,e,n,o,r){return b.openBlock(),b.createElementBlock("div",{class:"drag-area",style:b.normalizeStyle(i.style.main)},[i.maskList.includes(2)?(b.openBlock(),b.createElementBlock("div",{key:0,class:"area-wrap filters",onDragover:t[0]||(t[0]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[1]||(t[1]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[2]||(t[2]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[3]||(t[3]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.filters)},null,36)):b.createCommentVNode("",!0),i.maskList.includes(0)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:1,class:"area-wrap rows",onDragover:t[4]||(t[4]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[5]||(t[5]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[6]||(t[6]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[7]||(t[7]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.rows)},null,36)),i.maskList.includes(1)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:2,class:"area-wrap columns",onDragover:t[8]||(t[8]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[9]||(t[9]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[10]||(t[10]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[11]||(t[11]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.columns)},null,36)),i.maskList.includes(2)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:3,class:"area-wrap indicators",onDragover:t[12]||(t[12]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[13]||(t[13]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[14]||(t[14]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[15]||(t[15]=(...s)=>i.onDrop&&i.onDrop(...s)),style:b.normalizeStyle(i.style.indicators)},null,36))],4)}const XU=Ti(KU,[["render",YU],["__scopeId","data-v-01e4c58d"]]),qU=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r}=i;return async(l={})=>{var c;const a=aC(i,l),{url:h,...d}=a||{};let u=t;if(!u){const{pathname:g}=window==null?void 0:window.location;if(g){const f=g.split("/");f!=null&&f.length&&(u=f[f.length-1])}}if(h&&d)try{return await vs({url:`${e}${h}`,method:"post",headers:{Authentication:n,operateContext:o},data:{...d,dataSourceId:(r==null?void 0:r.dataSourceId)||"",pageId:u},signal:((c=window.controller)==null?void 0:c.signal)||""})}catch(g){console.error(g)}}},ZU=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r={}}=i;return async(l={})=>{var h;const a=aC(i,l);try{return(await vs({url:`${e}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:n,operateContext:o},data:{source:(r==null?void 0:r.source)||"INDICATOR_LIB",pageId:t,indicatorList:(a==null?void 0:a.indicatorList)||[],classifications:(a==null?void 0:a.queryColumns)||[],dataSourceId:(r==null?void 0:r.dataSourceId)||""},signal:((h=window.controller)==null?void 0:h.signal)||""})).data.data}catch(d){console.error(d)}}},JU={id:{type:String,default:""},name:{type:String,default:""},keyName:{type:String,default:""},type:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},position:{type:String,default:""},top:{type:String,default:""},left:{type:String,default:""},zIndex:{type:Number,default:1},events:{type:Array,default:()=>[]},dataType:{type:String,default:"indicator"},graphicConfig:{type:Object,default:()=>({})},data:{type:Array,default:()=>[]},scale:{type:Number,default:1},dimensionList:{type:Array,default:()=>[]},indicatorList:{type:Array,default:()=>[]},pageMode:{type:String,default:""},styleConfig:{type:Object,default:()=>({})},theme:{type:String,default:"light"},fullMode:{type:Boolean,default:!1},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""},enlargeContainer:{type:String,default:"body"},globalModel:{type:Object,default:()=>new Map},isIframeMode:{type:Boolean,default:!1},showLeftTree:{type:Boolean,default:!0},allowDrill:{type:Boolean,default:!1},showFullScreen:{type:Boolean,default:!0}},$v={LAST_DATA:"上期值",SAME_DATA:"同期值",DIFF_DATA:"增减额",MOM_DATA:"环比(%)",YOY_DATA:"同比(%)"},OM=[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"图形",menuKey:"graph"},{text:"筛选",menuKey:"filter"}],_s=["合计","平均值","计数","最大值","最小值","方差","标准差"],Gv=b.defineComponent({name:"PivotTable",components:{PivotFilter:cT,PivotProperty:n7,ConditionalProperty:YG,ChartModal:aU,PivotAggregate:uU,PivotTop:fU,PivotConfig:BU,IndSourceList:UU,DragArea:XU,PivotDetail:bU,SettingOutlined:$j,DatabaseOutlined:hj,ArrowsAltOutlined:Z7,ShrinkOutlined:Yj,FilterOutlined:zT,DeleteOutlined:DT},props:{...JU},setup(i,{expose:t,emit:e}){let n=null;const o=b.ref(!1),r=b.ref(""),s=b.ref({}),l=b.ref(),a=b.ref({}),h=b.ref({}),d=b.ref({}),u=b.ref(),c=b.ref({}),g=b.ref(),f=b.ref(),p=b.ref(),m=b.ref(),v=b.ref(),C=b.ref(),S=b.ref(),_=b.ref(),y=b.ref(!1),w=b.ref({}),A=b.ref({}),R=b.ref({}),x=b.ref(),M=b.ref({}),T=b.ref("200px"),B=b.ref("200px"),H=b.ref(300),k=b.ref({}),P=b.ref(),E=b.ref(i.showLeftTree),F=b.ref(!1),I=b.ref({}),L=b.ref(0),D=b.ref(0),O=b.ref(),V=b.ref(!1),W=b.ref(),j=b.ref([]);b.provide("indicatorUrl",i.indicatorUrl),b.provide("indicatorToken",i.indicatorToken);let $=`|${Dh(6)}|`;const X=b.ref({}),K=()=>{const N={borderColor:b.unref(G).borderColor};X.value=N},U=b.computed(()=>{let N="#ECF1F5";switch(i.theme){case"default":N="#EAF0F9";break;case"dark":N="#FFFFFF";break}return{borderColor:"#E3E3E3",headerBgColor:N,headerColor:"#252525",bodyBgColor:"#FFFFFF",bodyColor:"#252525",indicatorsHeaderBgColor:N,indicatorsHeaderColor:"#252525",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#252525",aggregateBgColor:N,aggregateColor:"#252525",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"}}),Q=b.ref(1),dt=b.ref();new ResizeObserver(N=>{for(const Y of N){const{width:tt}=Y.contentRect;dt.value=tt,Q.value++,b.nextTick(()=>{XM()})}}).observe(document.body);const xt=b.computed(()=>{const{width:N}=i;return N.includes("%")&&Q.value?i.isIframeMode?dt.value:document.querySelector(`#pivotWrap_${i.id}`).clientWidth:parseFloat(N)}),G=b.computed(()=>{var lt;const N={},{styleConfig:Y}=i;let tt={};(lt=Object.keys(Y))!=null&<.length?tt=Y:tt=b.unref(U);for(const Z in tt)N[Z]=tt[Z]||"transparent";return N}),q=b.ref({}),ot=()=>{const N=Il();N&&(b.unref(q).width=N.width+2+"px"),b.unref(q).backgroundColor=hC(b.unref(G).headerBgColor,2)};b.watch(()=>i.theme,()=>{n&&(n==null||n.updateOption(gt))});const ct=b.computed(()=>{var N,Y,tt;return i.fullMode&&!((N=gt.rows)!=null&&N.length)&&!((Y=gt.columns)!=null&&Y.length)&&!((tt=gt.indicators)!=null&&tt.length)}),_t=b.computed(()=>{var N;return{width:(N=i.width)!=null&&N.includes("%")?"calc(100%)":parseFloat(i.width)-b.unref(H)+"px",height:"100%",backgroundColor:i.theme==="darkBlue"?"#081653":"#F1F1F1",color:i.theme==="darkBlue"?"#b2c3dd":""}}),yt=b.computed(()=>{const N={fontSize:"14px"};return b.unref(E)&&(i.theme==="darkBlue"?N.color="#00CCFF":N.color="#416EFF"),N}),ht=b.ref([]),et=b.ref([]),mt=b.computed(()=>{var N;return(N=b.unref(G))==null?void 0:N.dropDownMenuBgColor}),st=b.computed(()=>{var N;return(N=b.unref(G))==null?void 0:N.dropDownMenuColor}),Ft=b.computed(()=>{var N;return(N=b.unref(G))==null?void 0:N.dropDownMenuHightLightColor}),Ht="-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",vt=b.computed(()=>b.unref(ht).filter(N=>N.isInnerFilter).concat(b.unref(et).filter(N=>N.isInnerFilter)).sort((N,Y)=>N.timeStamp-Y.timeStamp));CU(V9,{sortNotActiveColor:b.unref(G).sortNotActiveColor,sortActiveColor:b.unref(G).sortActiveColor});const Pt=b.ref([]),_e=b.ref({}),ge=b.ref({}),gt=b.reactive({records:[],columnHeaderTitle:!0,excelOptions:{fillHandle:!0},rows:[],columns:[],indicators:[],corner:{titleOnDimension:"row"},dataConfig:{sortRules:[],filterRules:[]},widthMode:"standard",menu:{renderMode:"html",dropDownMenuHighlight:[]},theme:{cellInnerBorder:!1,underlayBackgroundColor:"transparent",headerStyle:{bgColor(N){return b.unref(Pt).includes(N.dataValue)?b.unref(G).indicatorsHeaderBgColor:b.unref(G).headerBgColor},color(N){return b.unref(Pt).includes(N.dataValue)?b.unref(G).indicatorsHeaderColor:b.unref(G).headerColor},borderColor:b.unref(G).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},cornerHeaderStyle:{bgColor(){return b.unref(G).headerBgColor},color:b.unref(G).headerColor,borderColor:b.unref(G).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},bodyStyle:{borderColor:b.unref(G).borderColor,color(N){var lt,Z;const Y=N.cellHeaderPaths.rowHeaderPaths,tt=N.cellHeaderPaths.colHeaderPaths;return _s.includes((lt=Y==null?void 0:Y[Y.length-1])==null?void 0:lt.value)?b.unref(G).aggregateColor:b.unref(Pt).includes((Z=tt==null?void 0:tt[tt.length-1])==null?void 0:Z.value)?b.unref(G).indicatorsBodyColor:b.unref(G).bodyColor},bgColor(N){var lt,Z;const Y=N.cellHeaderPaths.rowHeaderPaths,tt=N.cellHeaderPaths.colHeaderPaths;return _s.includes((lt=Y==null?void 0:Y[Y.length-1])==null?void 0:lt.value)?b.unref(G).aggregateBgColor:b.unref(Pt).includes((Z=tt==null?void 0:tt[tt.length-1])==null?void 0:Z.value)?b.unref(G).indicatorsBodyBgColor:b.unref(G).bodyBgColor},fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},rowHeaderStyle:{borderColor:b.unref(G).borderColor,bgColor(N){return _s.includes(N.dataValue)?b.unref(G).aggregateBgColor:b.unref(G).bodyBgColor},color(N){return _s.includes(N.dataValue)?b.unref(G).aggregateColor:b.unref(G).bodyColor},fontFamily(){if(i.isIframeMode)return Ht},fontSize(){if(i.isIframeMode)return 14}},frameStyle:{borderLineWidth:1,borderColor:b.unref(G).borderColor}}}),Le=b.computed(()=>{let N=0;return b.unref(E)&&i.fullMode&&(N=b.unref(H)),N}),Fe=b.computed(()=>{let N=0;return b.unref(F)&&(N=20),N}),me=5,Ve=b.ref({});b.watch(y,N=>{if(N){const Y={};b.nextTick(()=>{var Z,rt;const tt=Il();let lt=0;(Z=b.unref(vt))!=null&&Z.length&&(lt=(rt=b.unref(O))==null?void 0:rt.clientHeight),tt&&(Y.width=tt.width+"px",Y.height=tt.height+"px",Y.top=tt.top+lt+b.unref(Fe)+"px",Y.left=tt.left+b.unref(Le)+b.unref(Fe)+"px"),Ve.value=Y})}});const ne=b.ref([]),Rt=b.ref([]),Mt=b.ref({}),Vt=b.ref({}),Xt=b.ref([]),de=b.ref([]),$t=b.ref([]),Lt=b.ref([]),we=b.computed(()=>{const N=[];for(const Z of b.unref(ne)){const{data:rt,indicatorKey:ut="",calculateType:wt=""}=Z||{};N.push({label:rt.indicatorKey,columnName:rt.indicatorKey,location:"LEFT",show:!0,calcType:"BUILT_IN",builtInFormula:wt,builtInValueSource:ut})}const Y=[];b.unref(Rt).forEach((Z,rt)=>{const ut=b.unref(ht).find(ue=>ue.label===Z.key),wt=b.unref(et).find(ue=>ue.label===Z.key),ft=ut||wt,Dt={};rt<b.unref(Rt).length-1&&(Dt.join="&&"),(ft==null?void 0:ft.genericType)==="DATE"&&(Dt.dateFormat="YYYY-MM-DD"),ft&&Y.push({fieldName:ft.name,fieldType:ft.genericType,fieldValue:Array.isArray(Z.value)?Z.value.join(","):Z.value,hrpIndexCode:ft.indexCode,hrpIndexCodeNum:ft.indexCodeNum,id:ft.id,label:ft.label,rule:Z.rule,targetSource:"",typeGuid:Z.typeGuid||"",type:Z.type,...Dt})});const tt=[];if(Object.keys(b.unref(Mt)))for(const Z in b.unref(Mt))b.unref(Mt)[Z]&&tt.push({key:Z,num:b.unref(Mt)[Z],rule:"TOP"});const lt=[];if(Object.keys(b.unref(Vt)))for(const Z in b.unref(Vt)){const{order:rt,type:ut,columnData:wt,columnHeader:ft}=b.unref(Vt)[Z];if(rt.toLowerCase()==="default-sort")continue;const Dt={label:Z,order:rt.toUpperCase(),type:"COMBINATION",fieldType:ut};ut==="indicators"&&(Dt.columnHeader=ft,Dt.columnData=wt,Dt.type="NORMAL"),lt.push(Dt)}return{calc:N,filter:Y,truncations:tt,sorts:lt,aggregateMethod:b.unref(M)||{}}}),Et=ZU(i),Ut=qU(i),Ae=b.ref({}),ai=async()=>{var wt,ft,Dt,ue;const{dimensionList:N,graphicConfig:Y={}}=i,{queryColumnList:tt=[]}=Y,{rows:lt=[],columns:Z=[]}=gt,rt=(wt=b.unref($t))!=null&&wt.length?b.unref($t):[],ut=(ft=b.unref(Lt))!=null&&ft.length?b.unref(Lt):[];if(!(rt!=null&&rt.length))for(const Zt of lt)rt.push(Zt.dimensionKey);if(!(ut!=null&&ut.length))for(const Zt of Z)ut.push(Zt.dimensionKey);if(rt!=null&&rt.length||rt.push(...N.filter(Zt=>Zt.position==="rows").map(Zt=>Zt.key)),ut!=null&&ut.length||ut.push(...N.filter(Zt=>Zt.position==="columns").map(Zt=>Zt.key)),tt!=null&&tt.length)for(const Zt of tt)!rt.includes(Zt.name)&&!ut.includes(Zt.name)&&rt.push(Zt.name);Ae.value={...b.unref(we),rowDimensionKeys:rt,colDimensionKeys:ut,dimensions:(Dt=b.unref(Xt))!=null&&Dt.length?b.unref(Xt):b.unref(ht),indicators:(ue=b.unref(de))!=null&&ue.length?b.unref(de):b.unref(et)};try{const Zt=await Ut({pivotTableCal:b.unref(Ae)});YM(Zt)}catch(Zt){console.error(Zt)}},sK=N=>{b.unref(ne).find(Y=>Y.data.indicatorKey===N.data.indicatorKey)||ne.value.push(N),ai()},lK=N=>{const Y=b.unref(ne).findIndex(tt=>tt.data.indicatorKey===N);Y!==-1&&ne.value.splice(Y,1),ai()},jM=N=>{const{key:Y="",rule:tt,type:lt=""}=N||{};let Z=Qe.cloneDeep(tt);Array.isArray(tt)||(Z=[tt]);const rt=b.unref(ht).find(ft=>ft.label===Y),ut=b.unref(et).find(ft=>ft.label===Y),wt=rt||ut;if((wt==null?void 0:wt.genericType)==="DATE"&&(Z==null?void 0:Z.length)===1){const ft=Z[0].value;Z[0].rule="GREATER_EQUAL",Z[1]={rule:"LESS_EQUAL",value:ft}}for(let ft=b.unref(Rt).length-1;ft>=0;ft--){const Dt=b.unref(Rt)[ft];Dt.key===Y&&Dt.type===lt&&b.unref(Rt).splice(ft,1)}for(const ft of Z){const{rule:Dt,value:ue}=ft;Y&&Dt&&ue&&Rt.value.push({key:Y,rule:Dt,value:ue,type:lt,typeGuid:wt.typeGuid})}ai()},aK=()=>{Mt.value=b.unref(w)||{},ai()},$M=N=>{const{key:Y,order:tt,type:lt,columnData:Z=[]}=N;if(lt==="indicators"){let rt="";for(const ut in b.unref(Vt))b.unref(Vt)[ut].type==="indicators"&&(rt=ut);rt&&delete b.unref(Vt)[rt]}b.unref(Vt)[Y]={order:tt,type:lt,columnData:Z},ai()},Oh=()=>{const N=b.unref(ht),Y=b.unref(et),tt=N.filter(Z=>Z.positionType==="rows").map(Z=>Z.name),lt=N.filter(Z=>Z.positionType==="columns").map(Z=>Z.name);Xt.value=Qe.cloneDeep(N),de.value=Qe.cloneDeep(Y),$t.value=Qe.cloneDeep(tt),Lt.value=Qe.cloneDeep(lt),ai()};function hK(N,Y=!0,tt=-1){if(tt>-1)gt.indicators.splice(tt,0,...N);else for(const lt of N)gt.indicators.push(lt);Y&&n.updateOption(gt)}function dK({label:N,calcType:Y}){const tt=[],lt=b.unref(ge)[N]||[];for(const Z in $v)lt.indexOf(Z)===-1&&tt.push({text:$v[Z],menuKey:Z});return Y==="FORMULA"||!(tt!=null&&tt.length)?OM:[{text:"计算",menuKey:"calculate",children:tt},...OM]}function GM(){var Y;const N=[{text:"钻取",menuKey:"drill"},{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"筛选",menuKey:"filter"},{text:"聚合",menuKey:"aggregate"},{text:"取top",menuKey:"top"},{text:"删除",menuKey:"delete"}];return i.fullMode||i.allowDrill?b.unref(j)&&Array.isArray(b.unref(j))&&(Y=b.unref(j))!=null&&Y.length?N[0].children=b.unref(j).map(tt=>({text:tt.title||tt.label,menuKey:tt.label})):N.splice(0,1):(N.splice(0,1),N.splice(-1,1)),N}function uK(N,Y){y.value=!0,b.unref(M)[Y]=N||[],ai(),e("tableChange",{type:"9",data:{key:Y,types:N}})}function cK(N,Y=!0){var tt;for(const lt of N){const{key:Z,name:rt,type:ut,dimensionKey:wt,width:ft}=lt;let Dt;if(wt)Dt=lt;else{const ue={dimensionKey:Z,title:rt,width:ft?`${ft}%`:"auto",type:ut};ut==="columns"?ue.headerStyle={textStick:!0}:ut==="rows"&&(ue.cornerHeaderIcon="sortNormal"),ue.headerFormat=Zt=>{if(ut==="rows"){const Be=Zt==null?void 0:Zt.split($);return Be!=null&&Be.length?Be[Be.length-1]:Zt}else return Zt},Dt=ue}if(Dt&&(Dt.headerStyle={textStick:!0},gt[ut].push(Dt)),(tt=gt[ut])!=null&&tt.length)for(const ue of gt[ut])ue.cornerDropDownMenu=GM();gt.dataConfig.sortRules.push({sortField:Z,sortType:b.unref(r)})}Y&&n.updateOption(gt),b.nextTick(()=>{KM()})}function UM(N){const Y={},{records:tt}=gt;for(const lt of tt)for(const Z of N)yn(Y,Z)?Y[Z].find(rt=>rt.value===lt[Z])||Y[Z].push({value:lt[Z]}):Y[Z]=[{value:lt[Z]}];return Y}function KM(){const{dataset:{columns:N,rows:Y}}=n,tt=Y.concat(N);s.value=UM(tt)}async function YM(N){var Zt,Be,$i,Ss,zh;j.value=await Et({pivotTableCal:b.unref(Ae)});let Y=N;N?W.value=Qe.cloneDeep(N):Y=Qe.cloneDeep(b.unref(W)),y.value=!0;const{data:tt={}}=(Y==null?void 0:Y.data)||{},{rows:lt=[]}=tt,Z=[],rt=[];for(const zt of b.unref(ht)){if(!zt.show)continue;const Ge=gt[zt.positionType].find(Ie=>Ie.dimensionKey===zt.label);Ge?rt.push({...Ge,title:zt.showTitle}):rt.push({key:zt.label,name:zt.showTitle,type:zt.positionType,width:zt.width})}for(const zt of b.unref(et)){if(!zt.show)continue;const Ge=dK(zt),Ie=gt.indicators.find(yi=>yi.indicatorKey===zt.label);let be={};Ie?be={...Ie,dropDownMenu:Ge,title:zt.showTitle}:be={indicatorKey:zt.label,title:zt.showTitle,width:zt!=null&&zt.width?`${zt.width}%`:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},dropDownMenu:Ge,format:(yi,er,on,xs)=>{const Gi=xs.getRecordByCell(er,on)||[];return Gi[0]&&isNaN(+Gi[0][zt.label])?Gi[0][zt.label]:yi}},be&&(be.style={padding:[16,28,16,28]},Z.push(be))}if(gt.indicators=[],gt.rows=[],gt.columns=[],(Zt=b.unref(ne))!=null&&Zt.length)for(const zt of b.unref(ne))isNaN(+zt.position)||Z.splice(+zt.position,0,{...zt.data,calculateType:zt.calculateType});const{sortType:ut,col:wt,row:ft}=b.unref(x)||{};for(const zt of Z)zt&&(zt.headerIcon=Ge=>{const{col:Ie,row:be}=Ge;if(wt===Ie&&ft===be){let yi="sortNormal";return ut==="ASC"?yi="sortUp":ut==="DESC"&&(yi="sortDown"),yi}else return"sortNormal"});hK(Z,!1),cK(rt,!1);const Dt=[],ue=rt.filter(zt=>zt.type==="rows").map(zt=>zt.key||zt.dimensionKey);for(const zt of lt)for(const Ge in zt)if(!_s.includes(zt[Ge])){const Ie=ue.indexOf(Ge);if(Ie!==-1){const be=[];for(let yi=0;yi<=Ie;yi++){const er=String(zt[ue[yi]]);if(er.includes($)){const on=er.split($);on!=null&&on.length&&be.push(on[on.length-1])}else be.push(er)}be!=null&&be.length&&(zt[Ge]=be.join($))}}for(const zt of rt){const Ge=(zt==null?void 0:zt.key)||(zt==null?void 0:zt.dimensionKey);if(zt.type==="columns"&&!b.unref(R)[Ge])b.unref(R)[Ge]=Uv("",Ge,lt);else if(zt.type==="rows")if(b.unref(A)[Ge]){const{type:Ie}=b.unref(A)[Ge]||{};Dt.push(Uv(Ie,Ge,lt))}else if(!b.unref(x)||b.unref(x).sortField===Ge||!n)Dt.push(Uv("",Ge,lt));else{const Ie=gt.dataConfig.sortRules.find(be=>be.sortField===Ge);Ie&&Dt.push(Ie)}}if(b.unref(x)&&Dt.push(b.unref(x)),(Be=Object.keys(b.unref(R)))!=null&&Be.length)for(const zt in b.unref(R))Dt.push(b.unref(R)[zt]);if(gt.records=lt,gt.dataConfig.sortRules=Dt,lt!=null&<.length&&(b.unref(I).records=[]),($i=gt.columns)!=null&&$i.length?gt.columnHeaderTitle=!0:(Ss=gt.indicators)!=null&&Ss.length?gt.columnHeaderTitle=!1:(zh=gt.rows)!=null&&zh.length&&(gt.columnHeaderTitle=!0),n)n.updateOption(gt),b.nextTick(()=>{qM()}),y.value=!1;else{const zt=document.getElementById(`pivotTableContainer_${i.id}`);n=new aT(zt,gt),b.nextTick(()=>{qM(),o.value=!0,y.value=!1,i.isIframeMode&&(b.unref(L)&&n.setScrollTop(b.unref(L)),b.unref(D)&&n.setScrollLeft(b.unref(D)))}),SK()}}const ws=b.ref({});function XM(){const N=Il();if(N)if(b.unref(F)){const Y=document.querySelector(`#pivotWrap_${i.id}`).clientWidth;b.unref(ws).top=b.unref(Fe)+"px",b.unref(ws).right=Y-N.width-b.unref(Le)-b.unref(Fe)+"px"}else b.unref(ws).top="0",b.unref(ws).right=b.unref(xt)-N.width-b.unref(Le)+"px"}function qM(){var N;if(n&&!((N=gt.records)!=null&&N.length)){const{dataset:{rows:Y}}=n,tt={};for(const lt of Y)tt[lt]="";b.unref(I).dataConfig={...gt.dataConfig,filterRules:[]},b.unref(I).records=[tt],n.updateOption({...gt,...b.unref(I)})}}function gK(N,Y){y.value=!0,jM({type:"indicators",key:N,rule:Y}),e("tableChange",{type:"3",data:{type:"indicators",key:N,rule:Y}})}function fK(N,Y){y.value=!0,jM({type:"dimension",key:N,rule:Y}),e("tableChange",{type:"3",data:{type:"dimension",key:N,rule:Y}})}function pK(N,Y){let tt=!1;const lt=gt[Y].findIndex(rt=>rt.dimensionKey===N),Z=gt.dataConfig.sortRules.findIndex(rt=>rt.sortField===N);if(lt!==-1){if(gt[Y].splice(lt,1),i.fullMode||i.allowDrill){const rt=b.unref(ht).findIndex(ut=>ut.label===N);rt!==-1&&(b.unref(ht)[rt].isInnerFilter?(b.unref(ht)[rt].show=!1,tt=!0):b.unref(ht).splice(rt,1))}else for(const rt of gt[Y])rt.cornerDropDownMenu=GM();y.value=!0,Oh(),e("tableChange",{type:"7"})}Z!==-1&&(gt.dataConfig.sortRules[Z].sortType=r),n.updateOption(gt),b.nextTick(()=>{if(KM(),!tt){delete a.value[N];const rt=b.unref(Rt).findIndex(ut=>ut.key===N);rt!==-1&&b.unref(Rt).splice(rt,1)}})}function mK(N){const{indicators:Y}=gt,tt=Y.findIndex(lt=>lt.indicatorKey===N);if(tt!==-1){const lt=Y[tt];if(Y.splice(tt,1),lt.calculateType){const Z=lt.indicatorKey.split("@"+lt.calculateType)[0],rt=b.unref(ge)[Z].indexOf(lt.calculateType);rt!==-1&&b.unref(ge)[Z].splice(rt,1);const ut=b.unref(Pt).indexOf(lt.title);ut!==-1&&b.unref(Pt).splice(ut,1),delete b.unref(_e)[lt.title]}lK(lt.indicatorKey),e("tableChange",{type:"2",data:lt.indicatorKey})}}function Uv(N,Y,tt){let lt=[];const Z=new Set;for(const rt of tt){const ut=rt[Y];ut&&!_s.includes(ut)&&Z.add(ut)}return lt=Array.from(Z),N==="asc"?lt=lt.sort((rt,ut)=>rt.localeCompare(ut)):N==="desc"&&(lt=lt.sort((rt,ut)=>ut.localeCompare(rt))),{sortField:Y,sortBy:[...lt,..._s]}}function ZM(N,Y,tt,lt){y.value=!0;let{menu:{dropDownMenuHighlight:Z},rows:rt}=gt;lt=lt+1,Z=Z.filter(wt=>!(wt.type==="dimension"&&wt.field===Y)||wt.type==="indicator"),Z.push({col:tt,row:lt-1,field:Y,type:"dimension",menuKey:N}),gt.menu.dropDownMenuHighlight=Z;const ut=rt.find(wt=>wt.dimensionKey===Y);if(ut){let wt="sortNormal";N==="asc"?wt="sortUp":N==="desc"&&(wt="sortDown"),ut.cornerHeaderIcon=wt}n.updateOption(gt),N==="default-sort"?delete b.unref(A)[Y]:b.unref(A)[Y]={type:N},$M({key:Y,order:N,type:"dimension"}),e("tableChange",{type:"4",data:{key:Y,order:N,type:"dimension"}})}function JM(N,Y,tt,lt,Z){var Be;y.value=!0;const{menu:rt}=gt;let ut=rt.dropDownMenuHighlight,wt="";(Be=gt.rows)!=null&&Be.length&&(wt=gt.rows[gt.rows.length-1].dimensionKey);const ft=tt.filter(($i,Ss)=>Ss<tt.length-1),Dt=ft.map($i=>({columnName:$i.dimensionKey})),ue=ft.map($i=>$i.value),Zt=ut.findIndex($i=>$i.field===wt&&$i.type==="dimension");Zt!==-1&&ut.splice(Zt,1),ut=ut.filter($i=>$i.type==="dimension"),ut.push({col:lt,row:Z,field:Y,type:"indicator",menuKey:N}),gt.menu.dropDownMenuHighlight=ut,n.updateOption(gt),N==="default-sort"?x.value=null:x.value={sortField:wt,sortByIndicator:Y,sortType:N.toUpperCase(),query:ue,col:lt,row:Z},$M({key:Y,order:N,type:"indicators",columnData:ue,columnHeader:Dt}),e("tableChange",{type:"4",data:{key:Y,order:N,type:"indicators"}})}function QM({dimensionKey:N,value:Y=""}){const tt={};b.unref(a)[N]&&(tt.filterData=b.unref(a)[N]),d.value={tableInstance:n,fieldName:Y||N,key:N,type:"dimension",...tt},b.nextTick(()=>{b.unref(u).showModal(),e("tableChange",{type:"5",data:N})})}function vK(N,Y){d.value={tableInstance:n,fieldName:Y,key:N,type:"indicators",filterData:b.unref(h)[N]},b.nextTick(()=>{b.unref(u).showModal()})}function bK({indicatorKey:N,menuKey:Y}){y.value=!0;let tt=gt.indicators.length-1;const lt=`${N}@${Y}`,Z=`${N}(${$v[Y]}) fx`;b.unref(Pt).push(Z),b.unref(_e)[Z]=lt,gt.indicators.forEach((rt,ut)=>{rt.indicatorKey===N&&(tt=ut+1)}),b.unref(ge)[N]||(b.unref(ge)[N]=[]),b.unref(ge)[N].push(Y),sK({data:{indicatorKey:lt,title:Z,width:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},headerIcon:"sortNormal",dropDownMenu:[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"删除",menuKey:"delete"}],style:{padding:[16,28,16,28]},format:(rt,ut,wt,ft)=>{const Dt=ft.getRecordByCell(ut,wt)||[];return Dt[0]&&isNaN(+Dt[0][lt])?Dt[0][lt]:rt}},position:tt,indicatorKey:N,calculateType:Y}),e("tableChange",{type:"1",data:{indicatorKey:N,calculateType:Y}})}function CK(){const N=gt.rows[0]?gt.rows[0].cornerDropDownMenu:[],Y=gt.columns[0]?gt.columns[0].cornerDropDownMenu:[],tt=gt.rows.map(ut=>({...ut,cornerDropDownMenu:Y})),lt=gt.columns.map(ut=>({...ut,cornerDropDownMenu:N}));gt.columns=tt,gt.rows=lt;const{type:Z,len:rt}=gt.aggregate||{};Z&&(gt.records.splice(-rt),gt.aggregate={type:Z,len:0}),gt.menu.dropDownMenuHighlight=[],a.value={},h.value={},c.value={},gt.dataConfig.filterRules=[],n.updateOption(gt)}function yK({indicatorKey:N,fieldName:Y}){const tt=Qg(N);if(tt>-1){const lt=gt.indicators[tt].formatConfig||{};b.unref(g).showModal({...lt,indicatorKey:N,fieldName:Y})}}function _K(N){const Y=Qg(N);if(Y>-1){const tt=gt.indicators[Y].conditionalConfig||[];b.unref(f).showModal(N,tt)}}function Qg(N){return gt.indicators.findIndex(Y=>Y.indicatorKey===N)}function wK(N){const Y=b.unref(ht)[0],tt=b.unref(ht).map(rt=>rt.label),lt=UM(tt),Z={xLabel:Y.label,yLabel:N,dimensionData:lt,records:gt.records};b.unref(C).showModal(Z)}function SK(){n.on("scroll",N=>{const{scrollDirection:Y}=N;Y==="vertical"?L.value=n.getScrollTop():Y==="horizontal"&&(D.value=n.getScrollLeft())}),n.on("dblclick_cell",N=>{console.log("dblclick_cell",N);const{cellLocation:Y=""}=N;Y==="body"&&b.unref(_).showModal({args:N,splitSymbol:$,dimension:b.unref(ht),indicator:b.unref(et)})}),n.on("after_render",()=>{K(),XM(),ot(),b.nextTick(()=>{o.value=!0})}),n.on("icon_click",N=>{const{name:Y,col:tt,row:lt}=N;if(["sortNormal","sortUp","sortDown"].includes(Y)){const{rows:Z,indicators:rt}=gt,ut=n.getCellValue(tt,lt);let wt=b.unref(ht).find(Be=>Be.showTitle===ut);if(wt||(wt=b.unref(et).find(Be=>Be.showTitle===ut)),!wt)return;let ft=wt.label;b.unref(Pt).includes(ft)&&(ft=b.unref(_e)[ft]);const Dt=Z.find(Be=>Be.dimensionKey===ft),ue=rt.find(Be=>Be.indicatorKey===ft);let Zt="default-sort";if(Y==="sortUp"?Zt="desc":Y==="sortDown"?Zt="default-sort":(!Y||Y==="sortNormal")&&(Zt="asc"),ue){const Be=n.getCellHeaderPaths(tt,lt);JM(Zt,ft,(Be==null?void 0:Be.colHeaderPaths)||[],tt,lt)}else Dt&&ZM(Zt,ft,tt,lt)}}),n.on("show_menu",()=>{const N=document.querySelector(`#pivotTableContainer_${i.id} .vtable__menu-element`);N&&(N.classList.add("first"),T.value=parseFloat(N.style.left)+N.clientWidth+3+"px",B.value=parseFloat(N.style.top)+"px")}),n.on("dropdown_menu_click",N=>{const{menuKey:Y,field:tt,col:lt,row:Z}=N,{dimensionKey:rt,indicatorKey:ut,value:wt}=tt[tt.length-1];l.value=N;const ft=b.unref(j).find(Dt=>Dt.label===Y);if(ft){const Dt=b.unref(ht).findIndex(ue=>ue.label===rt);if(Dt!==-1){const ue={...ft,show:!0,positionType:"rows",showTitle:ft.title||ft.label};ht.value.splice(Dt+1,0,ue),y.value=!0,Oh(),e("tableChange",{type:"8"})}}switch(Y){case"drill":alert("无维度可钻取");break;case"delete":rt?pK(rt,"rows"):ut&&mK(ut);break;case"asc":case"desc":case"default-sort":rt?ZM(Y,rt,lt,Z):ut&&JM(Y,ut,tt,lt,Z);break;case"filter":rt?QM({dimensionKey:rt}):ut&&vK(ut,wt);break;case"LAST_DATA":case"SAME_DATA":case"DIFF_DATA":case"MOM_DATA":case"YOY_DATA":case"zb":bK({indicatorKey:ut,menuKey:Y});break;case"trans":CK();break;case"property":yK({indicatorKey:ut,fieldName:wt});break;case"conditionalProperty":_K(ut);break;case"aggregate":b.unref(p).showModal(b.unref(M)[rt]||[],rt);break;case"top":xK(rt);break;case"graph":wK(ut);break}})}function xK(N){b.unref(m).showModal({value:b.unref(w)[N]||"",key:N})}function RK(){b.unref(v).showModal(b.unref(ht),b.unref(et))}function AK(N=[],Y=[]){const tt=N.concat(Y).map(rt=>rt.name),lt=b.unref(ht).filter(rt=>rt.isInnerFilter&&!tt.includes(rt.name)).map(rt=>({...rt,show:!1})),Z=b.unref(et).filter(rt=>rt.isInnerFilter&&!tt.includes(rt.name)).map(rt=>({...rt,show:!1}));ht.value=[...N,...lt],et.value=[...Y,...Z],i.fullMode||i.allowDrill?(A.value={},x.value={},R.value={},y.value=!0,Oh(),e("tableChange",{type:"10",data:{dimensions:b.unref(ht),indicators:b.unref(et)}})):YM()}function TK(N){if(!b.unref(P))return;const{name:Y,scope:tt}=b.unref(P),lt=b.unref(ht).find(ft=>ft.name===Y),Z=b.unref(ht).findIndex(ft=>ft.name===Y),rt=b.unref(et).find(ft=>ft.name===Y),ut=b.unref(et).findIndex(ft=>ft.name===Y),wt={timeStamp:new Date().getTime()};if(["rows","columns"].includes(N))if(lt)if(lt.show){Ii.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else lt.positionType=N,lt.show=!0,b.unref(ht).push(lt),b.unref(ht).splice(Z,1);else b.unref(ht).push({...Qe.cloneDeep(b.unref(P)),...wt,positionType:N,showTitle:b.unref(P).label});else if(N==="indicators")if(rt)if(rt.show){Ii.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else rt.show=!0,b.unref(et).push(rt),b.unref(et).splice(ut,1);else b.unref(et).push({...Qe.cloneDeep(b.unref(P)),...wt,showTitle:b.unref(P).label});else if(N==="filters"){if(["IDX","BUILT_IN_IDX"].includes(tt))if(b.unref(vt).find(ft=>ft.name===Y)){Ii.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else rt?(rt.isInnerFilter=!0,rt.timeStamp=new Date().getTime()):b.unref(et).push({...Qe.cloneDeep(b.unref(P)),showTitle:b.unref(P).label,show:!1,isInnerFilter:!0,...wt});else if(["DIM","BUILT_IN_DIM"].includes(tt))if(b.unref(vt).find(ft=>ft.name===Y)){Ii.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else lt?(lt.isInnerFilter=!0,lt.timeStamp=new Date().getTime()):b.unref(ht).push({...Qe.cloneDeep(b.unref(P)),positionType:"filters",showTitle:b.unref(P).label,show:!1,isInnerFilter:!0,...wt})}y.value=!0,P.value=null,Oh(),e("tableChange",{type:"10",data:{dimensions:b.unref(ht),indicators:b.unref(et)}})}const MK=(N=[])=>{let Y=!1;for(const tt of b.unref(ht))if(!N.find(Z=>Z.typeGuid===tt.typeGuid)){Y=!0;break}return Y};b.provide("setItemDisabled",MK);const tB=()=>{},BK=({checkKeys:N,key:Y,type:tt})=>{tt==="dimension"?(a.value[Y]=N,c.value={},fK(Y,N)):tt==="indicators"&&(h.value[Y]=N,gK(Y,N))};function PK(N){const{indicatorKey:Y,unit:tt="",format:lt,floatLength:Z,position:rt}=N,ut=Qg(Y);if(ut>-1){const wt=gt.indicators[ut];wt.formatConfig=N,wt.format=(ft,Dt,ue,Zt)=>{const Be=Zt.getRecordByCell(Dt,ue)||[];return Be[0]&&isNaN(+Be[0][wt.indicatorKey])?Be[0][wt.indicatorKey]:(lt==="integer"?ft=Math.round(Number(ft)):lt==="float"&&!isNaN(Z)?ft=Number(ft).toFixed(Z):lt==="percent"&&(ft=Number(ft)*100+"%"),rt==="right"?ft+tt:tt+ft)},n.updateOption(gt)}}function HK(N,Y=[]){const tt=Qg(N);if(tt>-1){const lt=gt.indicators[tt];lt.conditionalConfig=Y;const Z=[];Y.forEach(rt=>{let ut="";rt.conditions.forEach((wt,ft)=>{ft>0&&(ut+=wt.join==="and"?" && ":" || "),ut+=`value${wt.operation}${wt.value}`}),Z.push(ut)}),lt.style.color=({dataValue:rt})=>{let ut="#333";return Y.forEach((wt,ft)=>{wt.color&&(ut=Kv(Z[ft],rt)?wt.color:ut)}),ut},lt.style.textAlign=({dataValue:rt})=>{let ut="left";return Y.forEach((wt,ft)=>{wt.align&&(ut=Kv(Z[ft],rt)?wt.align:ut)}),ut},lt.customRender=({rect:rt,dataValue:ut})=>{let wt=[];return Y.forEach((ft,Dt)=>{if(ft.icon&&Kv(Z[Dt],ut)){const Zt=mP(ft.icon,ft.iconColor);wt=[{type:"icon",x:ft.align!=="right"?15:rt.width-25,y:rt.height/2-7,svg:Zt,height:14,width:14}]}}),{elements:wt,renderDefault:!0}},n.updateOption(gt)}}function Kv(N,Y){N=N||"true";const tt=`function (value){
|
|
368
368
|
if(${N}){
|
|
369
369
|
return true
|
|
370
370
|
}else{
|
|
371
371
|
return false
|
|
372
372
|
}
|
|
373
|
-
}`;return Function(`"use strict";return (${tt})`)().call(this,Y)}function HK(N){y.value=!0;const{value:Y,key:tt}=N;b.unref(w)[tt]=Y,lK(),e("tableChange",{type:"6",data:{key:tt,value:Y}})}function Il(){return n==null?void 0:n.getDrawRange()}const tf=b.ref([]),eB=b.ref(""),iB=b.ref(),EK=(N,Y)=>{var $i,Ss,zh,zt,Ge;const tt=Y.dataViewColumns[N.oldIndex]||{},{scope:lt}=tt;let Z=!1,rt=!1;["IDX","BUILT_IN_IDX"].includes(lt)?Z=!0:["DIM","BUILT_IN_DIM"].includes(lt)&&(rt=!0);const ut=Il(),{rows:wt,columns:ft,indicators:Dt,records:ue}=gt,{top:Zt,left:Be}=ut;if(b.unref(ct)){let Ie=i.height;i.isIframeMode&&(Ie=document.body.clientHeight+"px");let be=b.unref(_t).width;be.includes("calc")&&(be=b.unref(xt)-b.unref(H)+"px"),k.value.main={width:be,height:Ie,top:Zt+b.unref(Fe)+"px",left:Be+b.unref(Le)+b.unref(Fe)+"px"},k.value.rows={width:parseFloat(be)/2-me*2+"px",height:parseFloat(Ie)-me*2+"px",top:0,left:0},k.value.columns={width:parseFloat(be)/2-me*2+"px",height:parseFloat(Ie)/3-me*2+"px",top:0,left:parseFloat(be)/2+"px"},k.value.indicators={width:parseFloat(be)/2-me*2+"px",height:parseFloat(Ie)*2/3-me*2+"px",top:parseFloat(Ie)/3+"px",left:parseFloat(be)/2+"px"}}else{let Ie=50;($i=b.unref(vt))!=null&&$i.length?Ie=b.unref(O).clientHeight:rt&&(V.value=!0,b.unref(q).height=Ie+"px");let be=0,yi=1;const er=n.getRowHeight(0),on={columnHeaderTitle:!0};if(ft!=null&&ft.length?yi+=ft.length:on.columns=[{dimensionKey:Dh(6),title:"",width:"100px",type:"columns"}],wt!=null&&wt.length?wt.forEach((xs,Gi)=>{be+=n.getColWidth(Gi)}):(be=100,on.rows=[{dimensionKey:Dh(6),title:"",width:"100px",type:"rows"}]),Dt!=null&&Dt.length||(on.indicators=[{indicatorKey:Dh(6),title:"",width:"20%",format:()=>""}]),(Ss=Object.keys(on))!=null&&Ss.length){const{rows:xs=[],columns:Gi=[]}=on;let ro=[];ue!=null&&ue.length?ro=Qe.cloneDeep(ue):(zt=(zh=b.unref(I))==null?void 0:zh.records)!=null&&zt.length&&(ro=Qe.cloneDeep((Ge=b.unref(I))==null?void 0:Ge.records));let ir=ft.map(Wh=>Wh.dimensionKey);if(!(ir!=null&&ir.length)&&(Gi!=null&&Gi.length)&&(ir=[Gi[0].dimensionKey]),ro!=null&&ro.length)for(const Wh of ro){for(const Xv of xs)Wh[Xv.dimensionKey]="";let Yv=!1;for(const Xv in Wh)if(ir.includes(Xv)){Yv=!0;break}rt?Yv||(yi=2,Wh[ir[0]]=""):Z&&(Yv||(yi=1))}n.updateOption({...gt,...on,records:ro})}b.nextTick(()=>{var ir;const xs=Il(),Gi=xs.width,ro=xs.height;k.value.main={width:Gi+"px",height:ro+Ie+"px",top:Zt+b.unref(Fe)+"px",left:Be+b.unref(Le)+b.unref(Fe)+"px"},k.value.rows={width:be-me*2+"px",height:ro-me*2+"px",top:Ie+"px",left:0},k.value.columns={width:Gi-be-me*2+"px",height:yi*er-me*2+"px",top:Ie+"px",left:be+"px"},k.value.indicators={width:Gi-be-me*2+"px",height:ro-yi*er-me*2+"px",top:yi*er+((ir=b.unref(vt))!=null&&ir.length?Ie:0)+"px",left:be+"px"},k.value.filters={width:Gi-me*2+"px",height:Ie-me*2+"px",top:0,left:0}})}P.value=tt,Z?tf.value=[0,1]:rt&&(tf.value=[2])},kK=()=>{var N;(N=b.unref(I).records)!=null&&N.length?n.updateOption({...gt,records:b.unref(I).records}):n.updateOption(gt),V.value=!1,b.unref(q).height="",tf.value=[]},LK=()=>{var N;(N=b.unref(iB))==null||N.handleSearch(b.unref(eB))},FK=b.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:w.value,sortData:A.value,colSortData:R.value,indSortData:x.value,aggregateMap:M.value,subMenuLeft:T.value,subMenuTop:B.value,dragAreaStyle:k.value,showTreeData:E.value,largeVisible:F.value,temporaryData:I.value,splitSymbol:$,sourceListStyle:X.value,dimensionFieldList:ht.value,indicatorFieldList:et.value,computedIndKeys:Pt.value,computedIndMap:_e.value,computedIndFieldMap:ge.value,option:gt,loadingRect:Ve.value,calculateList:ne.value,filterList:Rt.value,topNumMap:Mt.value,sortMap:Vt.value,customDimensions:Xt.value,customIndicators:de.value,customRowKeys:$t.value,customColKeys:Lt.value,cacheResData:W.value,toolBoxStyle:ws.value,scrollTop:L.value,scrollLeft:D.value}));b.watch(FK,N=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(N)},{deep:!0});const nB=N=>{r.value=N.defaultSortRule,s.value=N.dimensionData,l.value=N.currentClickCell,a.value=N.dimFilterData,h.value=N.indFilterData,d.value=N.filterData,c.value=N.indFilterConfig,w.value=N.topNumData,A.value=N.sortData,R.value=N.colSortData,x.value=N.indSortData,M.value=N.aggregateMap,T.value=N.subMenuLeft,B.value=N.subMenuTop,k.value=N.dragAreaStyle,E.value=N.showTreeData,F.value=N.largeVisible,I.value=N.temporaryData,$=N.splitSymbol,X.value=N.sourceListStyle,ht.value=N.dimensionFieldList,et.value=N.indicatorFieldList,Pt.value=N.computedIndKeys,_e.value=N.computedIndMap,ge.value=N.computedIndFieldMap,Ve.value=N.loadingRect,ne.value=N.calculateList,Rt.value=N.filterList,Mt.value=N.topNumMap,Vt.value=N.sortMap,Xt.value=N.customDimensions,de.value=N.customIndicators,$t.value=N.customRowKeys,Lt.value=N.customColKeys,W.value=N.cacheResData,ws.value=N.toolBoxStyle,L.value=N.scrollTop,D.value=N.scrollLeft,Object.assign(gt,N.option)};function IK(N){y.value=!0,N&&nB(N),ai()}function DK(){return{dimensions:b.unref(ht),indicators:b.unref(et)}}const OK=N=>{const{scope:Y,name:tt,label:lt}=N;let Z=[];["IDX","BUILT_IN_IDX"].includes(Y)?Z=b.unref(et):["DIM","BUILT_IN_DIM"].includes(Y)&&(Z=b.unref(ht));const rt=Z.findIndex(ut=>ut.name===tt);if(rt!==-1){delete b.unref(a)[Z[rt].label];const ut=b.unref(Rt).findIndex(wt=>wt.key===lt);ut!==-1&&b.unref(Rt).splice(ut,1),Z[rt].show?Z[rt].isInnerFilter=!1:Z.splice(rt,1)}y.value=!0,Oh(),e("tableChange",{type:"10",data:{dimensions:b.unref(ht),indicators:b.unref(et)}})},zK=N=>{const{scope:Y,label:tt,showTitle:lt}=N,Z=xP(Y);Z==="indicator"||Z==="dimension"&&QM({dimensionKey:tt,value:lt})};t({option:gt,refreshData:IK,reRenderTable:nB,click:tB,getDrawRange:Il,getSaveData:DK}),b.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],([N,Y,tt])=>{const{queryColumnList:lt=[],indicators:Z=[]}=N,rt=Qe.cloneDeep(lt),ut=Qe.cloneDeep(Z);for(const wt of rt){const ft=Y.find(Dt=>Dt.key===wt.name);wt.positionType=(ft==null?void 0:ft.position)||"rows",wt.width=ft==null?void 0:ft.width,wt.showTitle=wt.label}for(const wt of ut){const ft=tt.find(Dt=>Dt.key===wt.name);wt.width=ft==null?void 0:ft.width,wt.showTitle=wt.label}ht.value=rt,et.value=ut},{immediate:!0,deep:!0});const WK=()=>{o.value=!1,E.value=!E.value},NK=()=>{o.value=!1,F.value=!F.value,window.enScale&&window.enScale(b.unref(F))},VK=N=>{const Y=b.unref(ht).find(rt=>rt.label===N),tt=b.unref(et).find(rt=>rt.label===N),lt=Y||tt,Z=b.unref(a)[N];return Z?lt.genericType==="DATE"?Array.isArray(Z)?`${Z[0].value}~${Z[1].value}`:Z.value:Z.value&&Array.isArray(Z.value)?Z.value.join("、"):"":""};return b.onMounted(()=>{}),{showDefaultTableArea:ct,maskList:tf,dropDownMenuColor:st,dropDownMenuBgColor:mt,dropDownMenuHightLightColor:Ft,styleData:G,subMenuLeft:T,subMenuTop:B,pivotTableRef:S,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:v,pivotAggregateRef:p,filterData:d,loadingRect:Ve,loading:y,isTableInit:o,toolBoxStyle:ws,indSourceRef:iB,searchText:eB,dragAreaStyle:k,offsetWidth:Le,showTreeData:E,dataIconStyle:yt,largeVisible:F,sourceListStyle:X,defaultTableStyle:_t,innerFilterStyle:q,innerFilterFieldList:vt,innerFilterRef:O,showFilterWrap:V,customDimensions:Xt,indicatorFieldList:et,dimensionFieldList:ht,click:tB,onFilterChange:MK,pivotDetailRef:_,handleFormat:BK,handleCondition:PK,handleAggregate:dK,handleGetTop:HK,handleConfig:xK,handleGetConfig:RK,onDragStart:EK,onDragEnd:kK,onSearch:LK,handleAddField:AK,toggleShowData:WK,handleEnScale:NK,adjustHSL:hC,handleDelFilterTag:OK,handleInnerFilter:zK,getFilterValue:VK}}}),zM=()=>{b.useCssVars(i=>({"4fe73a4e":i.dropDownMenuBgColor,a4092244:i.dropDownMenuColor,"3da8ae5a":i.dropDownMenuHightLightColor,"7507ab71":i.subMenuLeft,"0c08a0ab":i.subMenuTop}))},WM=Gv.setup;Gv.setup=WM?(i,t)=>(zM(),WM(i,t)):zM;const MY="",BY="",JU={key:0,class:"design-template"},QU=["id"],tK=["onClick"],eK=["title"],iK=["id"];function nK(i,t,e,n,o,r){var x,M;const s=b.resolveComponent("a-input-search"),l=b.resolveComponent("ind-source-list"),a=b.resolveComponent("filter-outlined"),h=b.resolveComponent("delete-outlined"),d=b.resolveComponent("a-tooltip"),u=b.resolveComponent("a-spin"),c=b.resolveComponent("database-outlined"),g=b.resolveComponent("shrink-outlined"),f=b.resolveComponent("arrows-alt-outlined"),p=b.resolveComponent("setting-outlined"),m=b.resolveComponent("drag-area"),v=b.resolveComponent("pivot-filter"),C=b.resolveComponent("pivot-property"),S=b.resolveComponent("conditional-property"),_=b.resolveComponent("chart-modal"),y=b.resolveComponent("pivot-aggregate"),w=b.resolveComponent("pivot-top"),A=b.resolveComponent("pivot-detail"),R=b.resolveComponent("pivot-config");return i.pageMode==="design"?(b.openBlock(),b.createElementBlock("div",JU," 透视表格 ")):(b.openBlock(),b.createBlock(b.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[b.createElementVNode("div",{class:b.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),id:`pivotWrap_${i.id}`},[i.fullMode?b.withDirectives((b.openBlock(),b.createElementBlock("div",{key:0,class:"data-source-list",style:b.normalizeStyle(i.sourceListStyle)},[b.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=T=>i.searchText=T),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),b.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,pageId:i.pageId,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["pageId","onOnDragStart","onOnDragEnd","config"])],4)),[[b.vShow,i.showTreeData]]):b.createCommentVNode("",!0),b.createElementVNode("div",{style:b.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((x=i.innerFilterFieldList)!=null&&x.length)||i.showFilterWrap)?(b.openBlock(),b.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:b.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.innerFilterFieldList,T=>(b.openBlock(),b.createElementBlock("div",{key:T.name,class:"filter-tag",style:b.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:B=>i.handleInnerFilter(T)},[b.createElementVNode("div",{class:"tag-text",style:b.normalizeStyle({color:i.styleData.headerColor})},b.toDisplayString(T.showTitle),5),i.getFilterValue(T.label)?(b.openBlock(),b.createElementBlock("div",{key:0,class:"filter-value",style:b.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(T.label)},b.toDisplayString(i.getFilterValue(T.label)),13,eK)):b.createCommentVNode("",!0),b.createElementVNode("span",{class:b.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[b.createVNode(a,{class:"filter-icon",style:b.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor})},null,8,["style"]),b.createVNode(d,{placement:"bottom"},{title:b.withCtx(()=>t[4]||(t[4]=[b.createElementVNode("span",null,"删除",-1)])),default:b.withCtx(()=>[b.createVNode(h,{class:"delete-icon",style:b.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor}),onClick:b.withModifiers(B=>i.handleDelFilterTag(T),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,tK))),128))],4)):b.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(b.openBlock(),b.createElementBlock("div",{key:1,class:"empty-table",style:b.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):b.createCommentVNode("",!0),b.withDirectives(b.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,iK),[[b.vShow,!i.showDefaultTableArea]])],4),i.loading?(b.openBlock(),b.createElementBlock("div",{key:1,class:"pivot-loading",style:b.normalizeStyle(i.loadingRect)},[b.createVNode(u,{size:"large"})],4)):b.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(b.openBlock(),b.createElementBlock("div",{key:2,class:"tool-box",style:b.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(b.openBlock(),b.createBlock(d,{key:0},{title:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...T)=>i.toggleShowData&&i.toggleShowData(...T))},[b.createVNode(c,{style:b.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1})):b.createCommentVNode("",!0),b.createVNode(d,null,{title:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:b.withCtx(()=>[i.showFullScreen?(b.openBlock(),b.createElementBlock("div",{key:0,class:b.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...T)=>i.handleEnScale&&i.handleEnScale(...T))},[i.largeVisible?(b.openBlock(),b.createBlock(g,{key:0,style:{"font-size":"14px",color:"#416EFF"}})):(b.openBlock(),b.createBlock(f,{key:1,style:{"font-size":"14px"}}))],2)):b.createCommentVNode("",!0)]),_:1}),b.createVNode(d,null,{title:b.withCtx(()=>t[5]||(t[5]=[b.createTextVNode("设置")])),default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...T)=>i.handleConfig&&i.handleConfig(...T))},[b.createVNode(p,{style:{"font-size":"14px"}})],2)]),_:1})],4)):b.createCommentVNode("",!0),(M=i.maskList)!=null&&M.length?(b.openBlock(),b.createBlock(m,{key:3,style:b.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):b.createCommentVNode("",!0)],10,QU),b.createVNode(v,{ref:"pivotFilterRef",data:i.filterData,theme:i.theme,graphicConfig:i.graphicConfig,indicatorUrl:i.indicatorUrl,pageId:i.pageId,indicatorToken:i.indicatorToken,context:i.context,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","theme","graphicConfig","indicatorUrl","pageId","indicatorToken","context","customDimensions","dimensions","indicators","onChange"]),b.createVNode(C,{ref:"pivotPropertyRef",theme:i.theme,onChange:i.handleFormat},null,8,["theme","onChange"]),b.createVNode(S,{ref:"conditionalPropertyRef",theme:i.theme,onChange:i.handleCondition},null,8,["theme","onChange"]),b.createVNode(_,{ref:"chartModalRef",theme:i.theme},null,8,["theme"]),b.createVNode(y,{ref:"pivotAggregateRef",theme:i.theme,onConfirm:i.handleAggregate},null,8,["theme","onConfirm"]),b.createVNode(w,{ref:"pivotTopRef",theme:i.theme,onConfirm:i.handleGetTop},null,8,["theme","onConfirm"]),b.createVNode(A,{ref:"pivotDetailRef",theme:i.theme,pageId:i.pageId,indicatorUrl:i.indicatorUrl,indicatorToken:i.indicatorToken,context:i.context},null,8,["theme","pageId","indicatorUrl","indicatorToken","context"]),b.createVNode(R,{ref:"pivotConfigRef",theme:i.theme,fullMode:i.fullMode,pageId:i.pageId,onConfirm:i.handleGetConfig},null,8,["theme","fullMode","pageId","onConfirm"])],8,["to","disabled"]))}const NM=dB(Ti(Gv,[["render",nK],["__scopeId","data-v-9f52b337"]])),VM=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:NM},Symbol.toStringTag,{value:"Module"})),oK={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(VM).forEach(n=>{const o=VM[n];o.install&&i.use(o)})}};Ke.EcanPivotTable=NM,Ke.default=oK,Object.defineProperties(Ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
373
|
+
}`;return Function(`"use strict";return (${tt})`)().call(this,Y)}function EK(N){y.value=!0;const{value:Y,key:tt}=N;b.unref(w)[tt]=Y,aK(),e("tableChange",{type:"6",data:{key:tt,value:Y}})}function Il(){return n==null?void 0:n.getDrawRange()}const tf=b.ref([]),eB=b.ref(""),iB=b.ref(),kK=(N,Y)=>{var $i,Ss,zh,zt,Ge;const tt=Y.dataViewColumns[N.oldIndex]||{},{scope:lt}=tt;let Z=!1,rt=!1;["IDX","BUILT_IN_IDX"].includes(lt)?Z=!0:["DIM","BUILT_IN_DIM"].includes(lt)&&(rt=!0);const ut=Il(),{rows:wt,columns:ft,indicators:Dt,records:ue}=gt,{top:Zt,left:Be}=ut;if(b.unref(ct)){let Ie=i.height;i.isIframeMode&&(Ie=document.body.clientHeight+"px");let be=b.unref(_t).width;be.includes("calc")&&(be=b.unref(xt)-b.unref(H)+"px"),k.value.main={width:be,height:Ie,top:Zt+b.unref(Fe)+"px",left:Be+b.unref(Le)+b.unref(Fe)+"px"},k.value.rows={width:parseFloat(be)/2-me*2+"px",height:parseFloat(Ie)-me*2+"px",top:0,left:0},k.value.columns={width:parseFloat(be)/2-me*2+"px",height:parseFloat(Ie)/3-me*2+"px",top:0,left:parseFloat(be)/2+"px"},k.value.indicators={width:parseFloat(be)/2-me*2+"px",height:parseFloat(Ie)*2/3-me*2+"px",top:parseFloat(Ie)/3+"px",left:parseFloat(be)/2+"px"}}else{let Ie=50;($i=b.unref(vt))!=null&&$i.length?Ie=b.unref(O).clientHeight:rt&&(V.value=!0,b.unref(q).height=Ie+"px");let be=0,yi=1;const er=n.getRowHeight(0),on={columnHeaderTitle:!0};if(ft!=null&&ft.length?yi+=ft.length:on.columns=[{dimensionKey:Dh(6),title:"",width:"100px",type:"columns"}],wt!=null&&wt.length?wt.forEach((xs,Gi)=>{be+=n.getColWidth(Gi)}):(be=100,on.rows=[{dimensionKey:Dh(6),title:"",width:"100px",type:"rows"}]),Dt!=null&&Dt.length||(on.indicators=[{indicatorKey:Dh(6),title:"",width:"20%",format:()=>""}]),(Ss=Object.keys(on))!=null&&Ss.length){const{rows:xs=[],columns:Gi=[]}=on;let ro=[];ue!=null&&ue.length?ro=Qe.cloneDeep(ue):(zt=(zh=b.unref(I))==null?void 0:zh.records)!=null&&zt.length&&(ro=Qe.cloneDeep((Ge=b.unref(I))==null?void 0:Ge.records));let ir=ft.map(Wh=>Wh.dimensionKey);if(!(ir!=null&&ir.length)&&(Gi!=null&&Gi.length)&&(ir=[Gi[0].dimensionKey]),ro!=null&&ro.length)for(const Wh of ro){for(const Xv of xs)Wh[Xv.dimensionKey]="";let Yv=!1;for(const Xv in Wh)if(ir.includes(Xv)){Yv=!0;break}rt?Yv||(yi=2,Wh[ir[0]]=""):Z&&(Yv||(yi=1))}n.updateOption({...gt,...on,records:ro})}b.nextTick(()=>{var ir;const xs=Il(),Gi=xs.width,ro=xs.height;k.value.main={width:Gi+"px",height:ro+Ie+"px",top:Zt+b.unref(Fe)+"px",left:Be+b.unref(Le)+b.unref(Fe)+"px"},k.value.rows={width:be-me*2+"px",height:ro-me*2+"px",top:Ie+"px",left:0},k.value.columns={width:Gi-be-me*2+"px",height:yi*er-me*2+"px",top:Ie+"px",left:be+"px"},k.value.indicators={width:Gi-be-me*2+"px",height:ro-yi*er-me*2+"px",top:yi*er+((ir=b.unref(vt))!=null&&ir.length?Ie:0)+"px",left:be+"px"},k.value.filters={width:Gi-me*2+"px",height:Ie-me*2+"px",top:0,left:0}})}P.value=tt,Z?tf.value=[0,1]:rt&&(tf.value=[2])},LK=()=>{var N;(N=b.unref(I).records)!=null&&N.length?n.updateOption({...gt,records:b.unref(I).records}):n.updateOption(gt),V.value=!1,b.unref(q).height="",tf.value=[]},FK=()=>{var N;(N=b.unref(iB))==null||N.handleSearch(b.unref(eB))},IK=b.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:w.value,sortData:A.value,colSortData:R.value,indSortData:x.value,aggregateMap:M.value,subMenuLeft:T.value,subMenuTop:B.value,dragAreaStyle:k.value,showTreeData:E.value,largeVisible:F.value,temporaryData:I.value,splitSymbol:$,sourceListStyle:X.value,dimensionFieldList:ht.value,indicatorFieldList:et.value,computedIndKeys:Pt.value,computedIndMap:_e.value,computedIndFieldMap:ge.value,option:gt,loadingRect:Ve.value,calculateList:ne.value,filterList:Rt.value,topNumMap:Mt.value,sortMap:Vt.value,customDimensions:Xt.value,customIndicators:de.value,customRowKeys:$t.value,customColKeys:Lt.value,cacheResData:W.value,toolBoxStyle:ws.value,scrollTop:L.value,scrollLeft:D.value}));b.watch(IK,N=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(N)},{deep:!0});const nB=N=>{r.value=N.defaultSortRule,s.value=N.dimensionData,l.value=N.currentClickCell,a.value=N.dimFilterData,h.value=N.indFilterData,d.value=N.filterData,c.value=N.indFilterConfig,w.value=N.topNumData,A.value=N.sortData,R.value=N.colSortData,x.value=N.indSortData,M.value=N.aggregateMap,T.value=N.subMenuLeft,B.value=N.subMenuTop,k.value=N.dragAreaStyle,E.value=N.showTreeData,F.value=N.largeVisible,I.value=N.temporaryData,$=N.splitSymbol,X.value=N.sourceListStyle,ht.value=N.dimensionFieldList,et.value=N.indicatorFieldList,Pt.value=N.computedIndKeys,_e.value=N.computedIndMap,ge.value=N.computedIndFieldMap,Ve.value=N.loadingRect,ne.value=N.calculateList,Rt.value=N.filterList,Mt.value=N.topNumMap,Vt.value=N.sortMap,Xt.value=N.customDimensions,de.value=N.customIndicators,$t.value=N.customRowKeys,Lt.value=N.customColKeys,W.value=N.cacheResData,ws.value=N.toolBoxStyle,L.value=N.scrollTop,D.value=N.scrollLeft,Object.assign(gt,N.option)};function DK(N){y.value=!0,N&&nB(N),ai()}function OK(){return{dimensions:b.unref(ht),indicators:b.unref(et)}}const zK=N=>{const{scope:Y,name:tt,label:lt}=N;let Z=[];["IDX","BUILT_IN_IDX"].includes(Y)?Z=b.unref(et):["DIM","BUILT_IN_DIM"].includes(Y)&&(Z=b.unref(ht));const rt=Z.findIndex(ut=>ut.name===tt);if(rt!==-1){delete b.unref(a)[Z[rt].label];const ut=b.unref(Rt).findIndex(wt=>wt.key===lt);ut!==-1&&b.unref(Rt).splice(ut,1),Z[rt].show?Z[rt].isInnerFilter=!1:Z.splice(rt,1)}y.value=!0,Oh(),e("tableChange",{type:"10",data:{dimensions:b.unref(ht),indicators:b.unref(et)}})},WK=N=>{const{scope:Y,label:tt,showTitle:lt}=N,Z=xP(Y);Z==="indicator"||Z==="dimension"&&QM({dimensionKey:tt,value:lt})};t({option:gt,refreshData:DK,reRenderTable:nB,click:tB,getDrawRange:Il,getSaveData:OK}),b.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],([N,Y,tt])=>{const{queryColumnList:lt=[],indicators:Z=[]}=N,rt=Qe.cloneDeep(lt),ut=Qe.cloneDeep(Z);for(const wt of rt){const ft=Y.find(Dt=>Dt.key===wt.name);wt.positionType=(ft==null?void 0:ft.position)||"rows",wt.width=ft==null?void 0:ft.width,wt.showTitle=wt.label}for(const wt of ut){const ft=tt.find(Dt=>Dt.key===wt.name);wt.width=ft==null?void 0:ft.width,wt.showTitle=wt.label}ht.value=rt,et.value=ut},{immediate:!0,deep:!0});const NK=()=>{o.value=!1,E.value=!E.value},VK=()=>{o.value=!1,F.value=!F.value,window.enScale&&window.enScale(b.unref(F))},jK=N=>{const Y=b.unref(ht).find(rt=>rt.label===N),tt=b.unref(et).find(rt=>rt.label===N),lt=Y||tt,Z=b.unref(a)[N];return Z?lt.genericType==="DATE"?Array.isArray(Z)?`${Z[0].value}~${Z[1].value}`:Z.value:Z.value&&Array.isArray(Z.value)?Z.value.join("、"):"":""};return b.onMounted(()=>{}),{showDefaultTableArea:ct,maskList:tf,dropDownMenuColor:st,dropDownMenuBgColor:mt,dropDownMenuHightLightColor:Ft,styleData:G,subMenuLeft:T,subMenuTop:B,pivotTableRef:S,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:v,pivotAggregateRef:p,filterData:d,loadingRect:Ve,loading:y,isTableInit:o,toolBoxStyle:ws,indSourceRef:iB,searchText:eB,dragAreaStyle:k,offsetWidth:Le,showTreeData:E,dataIconStyle:yt,largeVisible:F,sourceListStyle:X,defaultTableStyle:_t,innerFilterStyle:q,innerFilterFieldList:vt,innerFilterRef:O,showFilterWrap:V,customDimensions:Xt,indicatorFieldList:et,dimensionFieldList:ht,click:tB,onFilterChange:BK,pivotDetailRef:_,handleFormat:PK,handleCondition:HK,handleAggregate:uK,handleGetTop:EK,handleConfig:RK,handleGetConfig:AK,onDragStart:kK,onDragEnd:LK,onSearch:FK,handleAddField:TK,toggleShowData:NK,handleEnScale:VK,adjustHSL:hC,handleDelFilterTag:zK,handleInnerFilter:WK,getFilterValue:jK}}}),zM=()=>{b.useCssVars(i=>({"4fe73a4e":i.dropDownMenuBgColor,a4092244:i.dropDownMenuColor,"3da8ae5a":i.dropDownMenuHightLightColor,"7507ab71":i.subMenuLeft,"0c08a0ab":i.subMenuTop}))},WM=Gv.setup;Gv.setup=WM?(i,t)=>(zM(),WM(i,t)):zM;const BY="",PY="",QU={key:0,class:"design-template"},tK=["id"],eK=["onClick"],iK=["title"],nK=["id"];function oK(i,t,e,n,o,r){var x,M;const s=b.resolveComponent("a-input-search"),l=b.resolveComponent("ind-source-list"),a=b.resolveComponent("filter-outlined"),h=b.resolveComponent("delete-outlined"),d=b.resolveComponent("a-tooltip"),u=b.resolveComponent("a-spin"),c=b.resolveComponent("database-outlined"),g=b.resolveComponent("shrink-outlined"),f=b.resolveComponent("arrows-alt-outlined"),p=b.resolveComponent("setting-outlined"),m=b.resolveComponent("drag-area"),v=b.resolveComponent("pivot-filter"),C=b.resolveComponent("pivot-property"),S=b.resolveComponent("conditional-property"),_=b.resolveComponent("chart-modal"),y=b.resolveComponent("pivot-aggregate"),w=b.resolveComponent("pivot-top"),A=b.resolveComponent("pivot-detail"),R=b.resolveComponent("pivot-config");return i.pageMode==="design"?(b.openBlock(),b.createElementBlock("div",QU," 透视表格 ")):(b.openBlock(),b.createBlock(b.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[b.createElementVNode("div",{class:b.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),id:`pivotWrap_${i.id}`},[i.fullMode?b.withDirectives((b.openBlock(),b.createElementBlock("div",{key:0,class:"data-source-list",style:b.normalizeStyle(i.sourceListStyle)},[b.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=T=>i.searchText=T),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),b.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,pageId:i.pageId,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["pageId","onOnDragStart","onOnDragEnd","config"])],4)),[[b.vShow,i.showTreeData]]):b.createCommentVNode("",!0),b.createElementVNode("div",{style:b.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((x=i.innerFilterFieldList)!=null&&x.length)||i.showFilterWrap)?(b.openBlock(),b.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:b.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.innerFilterFieldList,T=>(b.openBlock(),b.createElementBlock("div",{key:T.name,class:"filter-tag",style:b.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:B=>i.handleInnerFilter(T)},[b.createElementVNode("div",{class:"tag-text",style:b.normalizeStyle({color:i.styleData.headerColor})},b.toDisplayString(T.showTitle),5),i.getFilterValue(T.label)?(b.openBlock(),b.createElementBlock("div",{key:0,class:"filter-value",style:b.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(T.label)},b.toDisplayString(i.getFilterValue(T.label)),13,iK)):b.createCommentVNode("",!0),b.createElementVNode("span",{class:b.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[b.createVNode(a,{class:"filter-icon",style:b.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor})},null,8,["style"]),b.createVNode(d,{placement:"bottom"},{title:b.withCtx(()=>t[4]||(t[4]=[b.createElementVNode("span",null,"删除",-1)])),default:b.withCtx(()=>[b.createVNode(h,{class:"delete-icon",style:b.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor}),onClick:b.withModifiers(B=>i.handleDelFilterTag(T),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,eK))),128))],4)):b.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(b.openBlock(),b.createElementBlock("div",{key:1,class:"empty-table",style:b.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):b.createCommentVNode("",!0),b.withDirectives(b.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,nK),[[b.vShow,!i.showDefaultTableArea]])],4),i.loading?(b.openBlock(),b.createElementBlock("div",{key:1,class:"pivot-loading",style:b.normalizeStyle(i.loadingRect)},[b.createVNode(u,{size:"large"})],4)):b.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(b.openBlock(),b.createElementBlock("div",{key:2,class:"tool-box",style:b.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(b.openBlock(),b.createBlock(d,{key:0},{title:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...T)=>i.toggleShowData&&i.toggleShowData(...T))},[b.createVNode(c,{style:b.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1})):b.createCommentVNode("",!0),b.createVNode(d,null,{title:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:b.withCtx(()=>[i.showFullScreen?(b.openBlock(),b.createElementBlock("div",{key:0,class:b.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...T)=>i.handleEnScale&&i.handleEnScale(...T))},[i.largeVisible?(b.openBlock(),b.createBlock(g,{key:0,style:{"font-size":"14px",color:"#416EFF"}})):(b.openBlock(),b.createBlock(f,{key:1,style:{"font-size":"14px"}}))],2)):b.createCommentVNode("",!0)]),_:1}),b.createVNode(d,null,{title:b.withCtx(()=>t[5]||(t[5]=[b.createTextVNode("设置")])),default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...T)=>i.handleConfig&&i.handleConfig(...T))},[b.createVNode(p,{style:{"font-size":"14px"}})],2)]),_:1})],4)):b.createCommentVNode("",!0),(M=i.maskList)!=null&&M.length?(b.openBlock(),b.createBlock(m,{key:3,style:b.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):b.createCommentVNode("",!0)],10,tK),b.createVNode(v,{ref:"pivotFilterRef",data:i.filterData,theme:i.theme,graphicConfig:i.graphicConfig,indicatorUrl:i.indicatorUrl,pageId:i.pageId,indicatorToken:i.indicatorToken,context:i.context,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","theme","graphicConfig","indicatorUrl","pageId","indicatorToken","context","customDimensions","dimensions","indicators","onChange"]),b.createVNode(C,{ref:"pivotPropertyRef",theme:i.theme,onChange:i.handleFormat},null,8,["theme","onChange"]),b.createVNode(S,{ref:"conditionalPropertyRef",theme:i.theme,onChange:i.handleCondition},null,8,["theme","onChange"]),b.createVNode(_,{ref:"chartModalRef",theme:i.theme},null,8,["theme"]),b.createVNode(y,{ref:"pivotAggregateRef",theme:i.theme,onConfirm:i.handleAggregate},null,8,["theme","onConfirm"]),b.createVNode(w,{ref:"pivotTopRef",theme:i.theme,onConfirm:i.handleGetTop},null,8,["theme","onConfirm"]),b.createVNode(A,{ref:"pivotDetailRef",theme:i.theme,pageId:i.pageId,indicatorUrl:i.indicatorUrl,indicatorToken:i.indicatorToken,context:i.context},null,8,["theme","pageId","indicatorUrl","indicatorToken","context"]),b.createVNode(R,{ref:"pivotConfigRef",theme:i.theme,fullMode:i.fullMode,pageId:i.pageId,onConfirm:i.handleGetConfig},null,8,["theme","fullMode","pageId","onConfirm"])],8,["to","disabled"]))}const NM=dB(Ti(Gv,[["render",oK],["__scopeId","data-v-9f52b337"]])),VM=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:NM},Symbol.toStringTag,{value:"Module"})),rK={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(VM).forEach(n=>{const o=VM[n];o.install&&i.use(o)})}};Ke.EcanPivotTable=NM,Ke.default=rK,Object.defineProperties(Ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
374
374
|
//# sourceMappingURL=index.umd.js.map
|