@ecan-bi/pivot-table 1.0.52 → 1.0.53
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/{DrillModal-5d50ff38.mjs → DrillModal-95d50cca.mjs} +39 -40
- package/dist/DrillModal-95d50cca.mjs.map +1 -0
- package/dist/{index-94659242.mjs → index-e10ad265.mjs} +369 -356
- package/dist/{index-94659242.mjs.map → index-e10ad265.mjs.map} +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/component/DrillModal.vue.d.ts +1 -1
- package/types/pivotTable/PivotAggregate.vue.d.ts +2 -0
- package/types/pivotTable/PivotTable.vue.d.ts +11 -0
- package/types/pivotTable/props.d.ts +4 -0
- package/dist/DrillModal-5d50ff38.mjs.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/pivot-table@1.0.
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.53 */
|
|
2
2
|
(function(Je,v){typeof exports=="object"&&typeof module<"u"?v(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"],v):(Je=typeof globalThis<"u"?globalThis:Je||self,v(Je["@ecan-bi/pivot-table"]={},Je.Vue,Je.Dayjs,Je.LodashEs,Je.Axios,Je.AntDesignVue,null,null,Je.Echarts,Je.Draggable))})(this,function(Je,v,Ho,Xe,AB,Vi,zY,WY,RB,Ab){"use strict";function TB(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 MB=TB(RB),BB=i=>(i.install=t=>{t.component(i.name,i)},i);function Rb(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 PB=()=>{},HB=Object.assign,EB=Array.isArray,ff=i=>typeof i=="function",kB=i=>typeof i=="symbol";let Tb;const pf=()=>Tb||(Tb=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mf(i){const t=i&&i.__v_raw;return t?mf(t):i}function Mb(i){return!(!i||i.__v_isRef!==!0)}function ji(i){return Mb(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(kB));const Wr=[];function vf(i,...t){if(process.env.NODE_ENV==="production")return;const e=Wr.length?Wr[Wr.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Wr[Wr.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)bf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${Db(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?[]:[`
|
|
@@ -364,11 +364,11 @@
|
|
|
364
364
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ij(i,t){if(i){if(typeof i=="string")return GT(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 GT(i,t)}}function GT(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 nj(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 oj(i){if(Array.isArray(i))return i}function UT(i){var t=jT(i),e=tj(t,2),n=e[0],o=e[1];return xv.setTwoToneColors({primaryColor:n,secondaryColor:o})}function rj(){var i=xv.getTwoToneColors();return i.calculated?[i.primaryColor,i.secondaryColor]:i.primaryColor}var sj=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function lj(i,t){return uj(i)||dj(i,t)||hj(i,t)||aj()}function aj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
365
365
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hj(i,t){if(i){if(typeof i=="string")return KT(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 KT(i,t)}}function KT(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 dj(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 uj(i){if(Array.isArray(i))return i}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){Av(i,o,e[o])})}return i}function Av(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function cj(i,t){if(i==null)return{};var e=gj(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 gj(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}UT("#1890ff");var Fl=function(t,e){var n,o=YT({},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=cj(o,sj),g=(n={anticon:!0},Av(n,"anticon-".concat(s.name),!!s.name),Av(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,b=jT(d),C=lj(b,2),_=C[0],w=C[1];return v.createVNode("span",YT({role:"img","aria-label":s.name},c,{onClick:u,class:g}),[v.createVNode(xv,{class:f,icon:s,primaryColor:_,secondaryColor:w,style:m},null)])};Fl.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},Fl.displayName="AntdIcon",Fl.inheritAttrs=!1,Fl.getTwoToneColor=rj,Fl.setTwoToneColor=UT;const fi=Fl;var fj={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 pj=fj;function XT(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){mj(i,o,e[o])})}return i}function mj(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=XT({},t,e.attrs);return v.createVNode(fi,XT({},n,{icon:pj}),null)};Rv.displayName="ArrowsAltOutlined",Rv.inheritAttrs=!1;const vj=Rv;var bj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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:"border",theme:"outlined"};const Cj=bj;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){yj(i,o,e[o])})}return i}function yj(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=qT({},t,e.attrs);return v.createVNode(fi,qT({},n,{icon:Cj}),null)};Tv.displayName="BorderOutlined",Tv.inheritAttrs=!1;const _j=Tv;var wj={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 Sj=wj;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){xj(i,o,e[o])})}return i}function xj(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=ZT({},t,e.attrs);return v.createVNode(fi,ZT({},n,{icon:Sj}),null)};Mv.displayName="CaretDownOutlined",Mv.inheritAttrs=!1;const Aj=Mv;var Rj={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 Tj=Rj;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){Mj(i,o,e[o])})}return i}function Mj(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=JT({},t,e.attrs);return v.createVNode(fi,JT({},n,{icon:Tj}),null)};Bv.displayName="CaretRightOutlined",Bv.inheritAttrs=!1;const Bj=Bv;var Pj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};const Hj=Pj;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){Ej(i,o,e[o])})}return i}function Ej(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=QT({},t,e.attrs);return v.createVNode(fi,QT({},n,{icon:Hj}),null)};Pv.displayName="ClearOutlined",Pv.inheritAttrs=!1;const kj=Pv;var Lj={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const Fj=Lj;function tM(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 Hv=function(t,e){var n=tM({},t,e.attrs);return v.createVNode(fi,tM({},n,{icon:Fj}),null)};Hv.displayName="CloseOutlined",Hv.inheritAttrs=!1;const Dj=Hv;var Oj={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 zj=Oj;function eM(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 Ev=function(t,e){var n=eM({},t,e.attrs);return v.createVNode(fi,eM({},n,{icon:zj}),null)};Ev.displayName="DatabaseOutlined",Ev.inheritAttrs=!1;const Nj=Ev;var Vj={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 jj=Vj;function iM(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 kv=function(t,e){var n=iM({},t,e.attrs);return v.createVNode(fi,iM({},n,{icon:jj}),null)};kv.displayName="DeleteOutlined",kv.inheritAttrs=!1;const nM=kv;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 Uj=Gj;function oM(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 Lv=function(t,e){var n=oM({},t,e.attrs);return v.createVNode(fi,oM({},n,{icon:Uj}),null)};Lv.displayName="FilterOutlined",Lv.inheritAttrs=!1;const rM=Lv;var Yj={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 Xj=Yj;function sM(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){qj(i,o,e[o])})}return i}function qj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Fv=function(t,e){var n=sM({},t,e.attrs);return v.createVNode(fi,sM({},n,{icon:Xj}),null)};Fv.displayName="FormOutlined",Fv.inheritAttrs=!1;const lM=Fv;var Zj={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 Jj=Zj;function aM(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){Qj(i,o,e[o])})}return i}function Qj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Iv=function(t,e){var n=aM({},t,e.attrs);return v.createVNode(fi,aM({},n,{icon:Jj}),null)};Iv.displayName="InsertRowAboveOutlined",Iv.inheritAttrs=!1;const t$=Iv;var e$={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 i$=e$;function hM(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){n$(i,o,e[o])})}return i}function n$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Dv=function(t,e){var n=hM({},t,e.attrs);return v.createVNode(fi,hM({},n,{icon:i$}),null)};Dv.displayName="InsertRowLeftOutlined",Dv.inheritAttrs=!1;const o$=Dv;var r$={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 s$=r$;function dM(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){l$(i,o,e[o])})}return i}function l$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Ov=function(t,e){var n=dM({},t,e.attrs);return v.createVNode(fi,dM({},n,{icon:s$}),null)};Ov.displayName="LoadingOutlined",Ov.inheritAttrs=!1;const a$=Ov;var h$={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 d$=h$;function uM(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){u$(i,o,e[o])})}return i}function u$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var zv=function(t,e){var n=uM({},t,e.attrs);return v.createVNode(fi,uM({},n,{icon:d$}),null)};zv.displayName="MinusCircleOutlined",zv.inheritAttrs=!1;const cM=zv;var c$={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 g$=c$;function gM(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){f$(i,o,e[o])})}return i}function f$(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=gM({},t,e.attrs);return v.createVNode(fi,gM({},n,{icon:g$}),null)};Wv.displayName="MinusSquareOutlined",Wv.inheritAttrs=!1;const p$=Wv;var m$={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 v$=m$;function fM(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){b$(i,o,e[o])})}return i}function b$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Nv=function(t,e){var n=fM({},t,e.attrs);return v.createVNode(fi,fM({},n,{icon:v$}),null)};Nv.displayName="PlusCircleOutlined",Nv.inheritAttrs=!1;const pM=Nv;var C$={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 y$=C$;function mM(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){_$(i,o,e[o])})}return i}function _$(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=mM({},t,e.attrs);return v.createVNode(fi,mM({},n,{icon:y$}),null)};Vv.displayName="SettingOutlined",Vv.inheritAttrs=!1;const w$=Vv;var S$={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 x$=S$;function vM(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){A$(i,o,e[o])})}return i}function A$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var jv=function(t,e){var n=vM({},t,e.attrs);return v.createVNode(fi,vM({},n,{icon:x$}),null)};jv.displayName="ShrinkOutlined",jv.inheritAttrs=!1;const R$=jv;var T$={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 M$=T$;function bM(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){B$(i,o,e[o])})}return i}function B$(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=bM({},t,e.attrs);return v.createVNode(fi,bM({},n,{icon:M$}),null)};$v.displayName="SlidersOutlined",$v.inheritAttrs=!1;const P$=$v;var H$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 240H144c-17.7 0-32 14.3-32 32v608c0 17.7 14.3 32 32 32h608c17.7 0 32-14.3 32-32V272c0-17.7-14.3-32-32-32zm-40 600H184V312h528v528zm168-728H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h576v576c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32zM300 550h296v64H300z"}}]},name:"switcher",theme:"outlined"};const E$=H$;function CM(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){k$(i,o,e[o])})}return i}function k$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Gv=function(t,e){var n=CM({},t,e.attrs);return v.createVNode(fi,CM({},n,{icon:E$}),null)};Gv.displayName="SwitcherOutlined",Gv.inheritAttrs=!1;const L$=Gv,pX="",F$=v.defineComponent({name:"ConditionalItemConfig",components:{PlusCircleOutlined:pM,FormOutlined:lM,MinusCircleOutlined:cM},props:{config:{type:Array,default(){return[]}}},setup(i,{emit:t}){const e=v.ref("add"),n=v.ref(!1),o=v.ref(-1),r=v.inject("getContainer",()=>{}),s=v.inject("theme","light");v.watch(o,()=>{t("change",v.unref(o))});const l=v.ref("");function a(){e.value="add",l.value="",n.value=!0}function h(){if(v.unref(o)===-1){Vi.message.info("请选择要修改的条件项");return}e.value="edit",l.value=i.config[v.unref(o)].name,n.value=!0}function d(){if(v.unref(o)===-1){Vi.message.info("请选择要删除的条件项");return}i.config.splice(v.unref(o),1),o.value=-1}function u(){v.unref(e)==="add"?i.config.push({name:v.unref(l),conditions:[]}):i.config[v.unref(o)].name=v.unref(l),n.value=!1}const c=v.computed(()=>v.unref(s)==="darkBlue"?"#b2c3dd":"");return v.watch(n,g=>{g&&window.modalShow&&window.modalShow(g)}),{theme:s,modalType:e,visible:n,selectedIndex:o,addItem:a,name:l,handleOk:u,editItem:h,deleteItem:d,fontColor:c,getContainer:r}}}),I$={class:"content"},D$={style:{display:"flex","align-items":"center"}},O$={class:"list"},z$=["onClick"];function W$(i,t,e,n,o,r){const s=v.resolveComponent("plus-circle-outlined"),l=v.resolveComponent("a-button"),a=v.resolveComponent("form-outlined"),h=v.resolveComponent("minus-circle-outlined"),d=v.resolveComponent("a-input"),u=v.resolveComponent("a-form-item"),c=v.resolveComponent("a-form"),g=v.resolveComponent("a-modal");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",I$,[v.createElementVNode("div",D$,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},"条件项配置",4),v.createElementVNode("div",null,[v.createVNode(l,{class:"condition-button",onClick:i.addItem},{default:v.withCtx(()=>[v.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick"]),v.createVNode(l,{class:"condition-button",onClick:i.editItem},{default:v.withCtx(()=>[v.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick"]),v.createVNode(l,{class:"condition-button",onClick:i.deleteItem},{default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick"])])]),v.createElementVNode("div",O$,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.config,(f,p)=>(v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["list-item",i.selectedIndex===p?"active":""]),key:p,onClick:m=>i.selectedIndex=p,style:v.normalizeStyle({color:i.fontColor})},v.toDisplayString(f.name),15,z$))),128))])]),v.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,getContainer:i.getContainer,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(c,{name:"conditionItem"},{default:v.withCtx(()=>[v.createVNode(u,{label:"条件项名称"},{default:v.withCtx(()=>[v.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","getContainer","onOk"])],64)}const N$=Ti(F$,[["render",W$],["__scopeId","data-v-1b06e44c"]]),mX="",V$=v.defineComponent({name:"ConditionalConfig",components:{PlusCircleOutlined:pM,FormOutlined:lM,MinusCircleOutlined:cM},props:{config:{type:Array,default(){return[]}},isSelected:{type:Boolean}},setup(i){const t=v.ref("add"),e=v.ref(!1),n=v.ref(-1),o=v.ref({}),r=v.ref(!1),s=v.ref(),l=v.inject("theme","light"),a=v.inject("getContainer",()=>{}),h=v.computed(()=>_=>{const w=`当前值 ${_.operation} ${_.value}`;return _.join?`${_.join} ${w}`:w});v.watch(()=>i.config,()=>{n.value=-1});const d=[{label:"与",value:"and"},{label:"或",value:"or"}],u=[{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"<="},{label:"等于",value:"=="},{label:"不等于",value:"!="}],c={operation:[{required:!0,message:"操作符不能为空"}],value:[{required:!0,message:"值不能为空"}]};function g(){t.value="add",r.value=i.config.length>0,v.unref(r)?o.value={join:"and",operation:"",value:""}:o.value={operation:"",value:""},e.value=!0}function f(){if(v.unref(n)===-1){Vi.message.info("请选择要修改的条件配置");return}t.value="edit",r.value=v.unref(n)!==0,o.value=i.config[v.unref(n)],e.value=!0}function p(){if(v.unref(n)===-1){Vi.message.info("请选择要删除的条件配置");return}i.config.splice(v.unref(n),1),n.value=-1}function m(){v.unref(s).validateFields().then(()=>{v.unref(t)==="add"?i.config.push(v.unref(o)):i.config[v.unref(n)]=v.unref(o),e.value=!1}).catch(()=>{})}const b=v.computed(()=>i.theme==="darkBlue"?"#b2c3dd":""),C=()=>document.getElementsByClassName("update-config-modal")[0]||document.body;return v.watch(e,_=>{_&&window.modalShow&&window.modalShow(_)}),{theme:l,modalType:t,visible:e,selectedIndex:n,addItem:g,handleOk:m,editItem:f,deleteItem:p,operateOptions:u,formData:o,joinOptions:d,isShowJoin:r,formRules:c,formRef:s,conditionTitle:h,fontColor:b,getPopupContainer:C,getContainer:a}}}),j$={class:"content"},$$={style:{display:"flex","align-items":"center"}},G$={class:"list"},U$=["onClick"];function K$(i,t,e,n,o,r){const s=v.resolveComponent("plus-circle-outlined"),l=v.resolveComponent("a-button"),a=v.resolveComponent("form-outlined"),h=v.resolveComponent("minus-circle-outlined"),d=v.resolveComponent("a-select"),u=v.resolveComponent("a-form-item"),c=v.resolveComponent("a-input"),g=v.resolveComponent("a-form"),f=v.resolveComponent("a-modal");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",j$,[v.createElementVNode("div",$$,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},"条件配置",4),v.createElementVNode("div",null,[v.createVNode(l,{class:"condition-button",onClick:i.addItem,disabled:!i.isSelected},{default:v.withCtx(()=>[v.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick","disabled"]),v.createVNode(l,{class:"condition-button",onClick:i.editItem,disabled:!i.isSelected},{default:v.withCtx(()=>[v.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick","disabled"]),v.createVNode(l,{class:"condition-button",onClick:i.deleteItem,disabled:!i.isSelected},{default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick","disabled"])])]),v.createElementVNode("div",G$,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.config,(p,m)=>(v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["list-item",i.selectedIndex===m?"active":""]),key:m,onClick:b=>i.selectedIndex=m,style:v.normalizeStyle({color:i.fontColor})},v.toDisplayString(i.conditionTitle(p)),15,U$))),128))])]),v.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,getContainer:i.getContainer,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(g,{model:i.formData,rules:i.formRules,ref:"formRef"},{default:v.withCtx(()=>[i.isShowJoin?(v.openBlock(),v.createBlock(u,{key:0,label:"与上一条件关系",name:"join",required:!0},{default:v.withCtx(()=>[v.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})):v.createCommentVNode("",!0),v.createVNode(u,{label:"操作符",name:"operation",required:!0},{default:v.withCtx(()=>[v.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}),v.createVNode(u,{label:"值",name:"value",required:!0},{default:v.withCtx(()=>[v.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","getContainer","onOk"])],64)}const Y$=Ti(V$,[["render",K$],["__scopeId","data-v-21bb0e50"]]);var rn="top",Nn="bottom",Vn="right",sn="left",Uv="auto",Fh=[rn,Nn,Vn,sn],Il="start",Ih="end",X$="clippingParents",yM="viewport",Dh="popper",q$="reference",_M=Fh.reduce(function(i,t){return i.concat([t+"-"+Il,t+"-"+Ih])},[]),wM=[].concat(Fh,[Uv]).reduce(function(i,t){return i.concat([t,t+"-"+Il,t+"-"+Ih])},[]),Z$="beforeRead",J$="read",Q$="afterRead",tG="beforeMain",eG="main",iG="afterMain",nG="beforeWrite",oG="write",rG="afterWrite",sG=[Z$,J$,Q$,tG,eG,iG,nG,oG,rG];function xo(i){return i?(i.nodeName||"").toLowerCase():null}function _n(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function As(i){var t=_n(i).Element;return i instanceof t||i instanceof Element}function jn(i){var t=_n(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Kv(i){if(typeof ShadowRoot>"u")return!1;var t=_n(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function lG(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];!jn(r)||!xo(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 aG(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},{});!jn(o)||!xo(o)||(Object.assign(o.style,l),Object.keys(r).forEach(function(a){o.removeAttribute(a)}))})}}const hG={name:"applyStyles",enabled:!0,phase:"write",fn:lG,effect:aG,requires:["computeStyles"]};function Ao(i){return i.split("-")[0]}var Rs=Math.max,jg=Math.min,Dl=Math.round;function Yv(){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 SM(){return!/^((?!chrome|android).)*safari/i.test(Yv())}function Ol(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=i.getBoundingClientRect(),o=1,r=1;t&&jn(i)&&(o=i.offsetWidth>0&&Dl(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&Dl(n.height)/i.offsetHeight||1);var s=As(i)?_n(i):window,l=s.visualViewport,a=!SM()&&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 Xv(i){var t=Ol(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 xM(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Kv(e)){var n=t;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function lr(i){return _n(i).getComputedStyle(i)}function dG(i){return["table","td","th"].indexOf(xo(i))>=0}function zr(i){return((As(i)?i.ownerDocument:i.document)||window.document).documentElement}function $g(i){return xo(i)==="html"?i:i.assignedSlot||i.parentNode||(Kv(i)?i.host:null)||zr(i)}function AM(i){return!jn(i)||lr(i).position==="fixed"?null:i.offsetParent}function uG(i){var t=/firefox/i.test(Yv()),e=/Trident/i.test(Yv());if(e&&jn(i)){var n=lr(i);if(n.position==="fixed")return null}var o=$g(i);for(Kv(o)&&(o=o.host);jn(o)&&["html","body"].indexOf(xo(o))<0;){var r=lr(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 Oh(i){for(var t=_n(i),e=AM(i);e&&dG(e)&&lr(e).position==="static";)e=AM(e);return e&&(xo(e)==="html"||xo(e)==="body"&&lr(e).position==="static")?t:e||uG(i)||t}function qv(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function zh(i,t,e){return Rs(i,jg(t,e))}function cG(i,t,e){var n=zh(i,t,e);return n>e?e:n}function RM(){return{top:0,right:0,bottom:0,left:0}}function TM(i){return Object.assign({},RM(),i)}function MM(i,t){return t.reduce(function(e,n){return e[n]=i,e},{})}var gG=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,TM(typeof t!="number"?t:MM(t,Fh))};function fG(i){var t,e=i.state,n=i.name,o=i.options,r=e.elements.arrow,s=e.modifiersData.popperOffsets,l=Ao(e.placement),a=qv(l),h=[sn,Vn].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!s)){var u=gG(o.padding,e),c=Xv(r),g=a==="y"?rn:sn,f=a==="y"?Nn:Vn,p=e.rects.reference[d]+e.rects.reference[a]-s[a]-e.rects.popper[d],m=s[a]-e.rects.reference[a],b=Oh(r),C=b?a==="y"?b.clientHeight||0:b.clientWidth||0:0,_=p/2-m/2,w=u[g],y=C-c[d]-u[f],S=C/2-c[d]/2+_,R=zh(w,S,y),A=a;e.modifiersData[n]=(t={},t[A]=R,t.centerOffset=R-S,t)}}function pG(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)||xM(t.elements.popper,o)&&(t.elements.arrow=o))}const mG={name:"arrow",enabled:!0,phase:"main",fn:fG,effect:pG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zl(i){return i.split("-")[1]}var vG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bG(i,t){var e=i.x,n=i.y,o=t.devicePixelRatio||1;return{x:Dl(e*o)/o||0,y:Dl(n*o)/o||0}}function BM(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 b=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),_=sn,w=rn,y=window;if(h){var S=Oh(e),R="clientHeight",A="clientWidth";if(S===_n(e)&&(S=zr(e),lr(S).position!=="static"&&l==="absolute"&&(R="scrollHeight",A="scrollWidth")),S=S,o===rn||(o===sn||o===Vn)&&r===Ih){w=Nn;var x=u&&S===y&&y.visualViewport?y.visualViewport.height:S[R];p-=x-n.height,p*=a?1:-1}if(o===sn||(o===rn||o===Nn)&&r===Ih){_=Vn;var T=u&&S===y&&y.visualViewport?y.visualViewport.width:S[A];g-=T-n.width,g*=a?1:-1}}var M=Object.assign({position:l},h&&vG),B=d===!0?bG({x:g,y:p},_n(e)):{x:g,y:p};if(g=B.x,p=B.y,a){var P;return Object.assign({},M,(P={},P[w]=C?"0":"",P[_]=b?"0":"",P.transform=(y.devicePixelRatio||1)<=1?"translate("+g+"px, "+p+"px)":"translate3d("+g+"px, "+p+"px, 0)",P))}return Object.assign({},M,(t={},t[w]=C?p+"px":"",t[_]=b?g+"px":"",t.transform="",t))}function CG(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:Ao(t.placement),variation:zl(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,BM(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,BM(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 yG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:CG,data:{}};var Gg={passive:!0};function _G(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=_n(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",e.update,Gg)}),l&&a.addEventListener("resize",e.update,Gg),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",e.update,Gg)}),l&&a.removeEventListener("resize",e.update,Gg)}}const wG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_G,data:{}};var SG={left:"right",right:"left",bottom:"top",top:"bottom"};function Ug(i){return i.replace(/left|right|bottom|top/g,function(t){return SG[t]})}var xG={start:"end",end:"start"};function PM(i){return i.replace(/start|end/g,function(t){return xG[t]})}function Zv(i){var t=_n(i),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Jv(i){return Ol(zr(i)).left+Zv(i).scrollLeft}function AG(i,t){var e=_n(i),n=zr(i),o=e.visualViewport,r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;var h=SM();(h||!h&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:r,height:s,x:l+Jv(i),y:a}}function RG(i){var t,e=zr(i),n=Zv(i),o=(t=i.ownerDocument)==null?void 0:t.body,r=Rs(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Rs(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-n.scrollLeft+Jv(i),a=-n.scrollTop;return lr(o||e).direction==="rtl"&&(l+=Rs(e.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}function Qv(i){var t=lr(i),e=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+n)}function HM(i){return["html","body","#document"].indexOf(xo(i))>=0?i.ownerDocument.body:jn(i)&&Qv(i)?i:HM($g(i))}function Wh(i,t){var e;t===void 0&&(t=[]);var n=HM(i),o=n===((e=i.ownerDocument)==null?void 0:e.body),r=_n(n),s=o?[r].concat(r.visualViewport||[],Qv(n)?n:[]):n,l=t.concat(s);return o?l:l.concat(Wh($g(s)))}function tb(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function TG(i,t){var e=Ol(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 EM(i,t,e){return t===yM?tb(AG(i,e)):As(t)?TG(t,e):tb(RG(zr(i)))}function MG(i){var t=Wh($g(i)),e=["absolute","fixed"].indexOf(lr(i).position)>=0,n=e&&jn(i)?Oh(i):i;return As(n)?t.filter(function(o){return As(o)&&xM(o,n)&&xo(o)!=="body"}):[]}function BG(i,t,e,n){var o=t==="clippingParents"?MG(i):[].concat(t),r=[].concat(o,[e]),s=r[0],l=r.reduce(function(a,h){var d=EM(i,h,n);return a.top=Rs(d.top,a.top),a.right=jg(d.right,a.right),a.bottom=jg(d.bottom,a.bottom),a.left=Rs(d.left,a.left),a},EM(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 kM(i){var t=i.reference,e=i.element,n=i.placement,o=n?Ao(n):null,r=n?zl(n):null,s=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,a;switch(o){case rn:a={x:s,y:t.y-e.height};break;case Nn:a={x:s,y:t.y+t.height};break;case Vn:a={x:t.x+t.width,y:l};break;case sn:a={x:t.x-e.width,y:l};break;default:a={x:t.x,y:t.y}}var h=o?qv(o):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case Il:a[h]=a[h]-(t[d]/2-e[d]/2);break;case Ih:a[h]=a[h]+(t[d]/2-e[d]/2);break}}return a}function Nh(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?X$:l,h=e.rootBoundary,d=h===void 0?yM:h,u=e.elementContext,c=u===void 0?Dh:u,g=e.altBoundary,f=g===void 0?!1:g,p=e.padding,m=p===void 0?0:p,b=TM(typeof m!="number"?m:MM(m,Fh)),C=c===Dh?q$:Dh,_=i.rects.popper,w=i.elements[f?C:c],y=BG(As(w)?w:w.contextElement||zr(i.elements.popper),a,d,s),S=Ol(i.elements.reference),R=kM({reference:S,element:_,strategy:"absolute",placement:o}),A=tb(Object.assign({},_,R)),x=c===Dh?A:S,T={top:y.top-x.top+b.top,bottom:x.bottom-y.bottom+b.bottom,left:y.left-x.left+b.left,right:x.right-y.right+b.right},M=i.modifiersData.offset;if(c===Dh&&M){var B=M[o];Object.keys(T).forEach(function(P){var F=[Vn,Nn].indexOf(P)>=0?1:-1,H=[rn,Nn].indexOf(P)>=0?"y":"x";T[P]+=B[H]*F})}return T}function PG(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?wM:a,d=zl(n),u=d?l?_M:_M.filter(function(f){return zl(f)===d}):Fh,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]=Nh(i,{placement:p,boundary:o,rootBoundary:r,padding:s})[Ao(p)],f},{});return Object.keys(g).sort(function(f,p){return g[f]-g[p]})}function HG(i){if(Ao(i)===Uv)return[];var t=Ug(i);return[PM(i),t,PM(t)]}function EG(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,b=Ao(m),C=b===m,_=a||(C||!f?[Ug(m)]:HG(m)),w=[m].concat(_).reduce(function(j,$){return j.concat(Ao($)===Uv?PG(t,{placement:$,boundary:d,rootBoundary:u,padding:h,flipVariations:f,allowedAutoPlacements:p}):$)},[]),y=t.rects.reference,S=t.rects.popper,R=new Map,A=!0,x=w[0],T=0;T<w.length;T++){var M=w[T],B=Ao(M),P=zl(M)===Il,F=[rn,Nn].indexOf(B)>=0,H=F?"width":"height",E=Nh(t,{placement:M,boundary:d,rootBoundary:u,altBoundary:c,padding:h}),L=F?P?Vn:sn:P?Nn:rn;y[H]>S[H]&&(L=Ug(L));var I=Ug(L),k=[];if(r&&k.push(E[B]<=0),l&&k.push(E[L]<=0,E[I]<=0),k.every(function(j){return j})){x=M,A=!1;break}R.set(M,k)}if(A)for(var D=f?3:1,O=function($){var Y=w.find(function(K){var G=R.get(K);if(G)return G.slice(0,$).every(function(Q){return Q})});if(Y)return x=Y,"break"},N=D;N>0;N--){var z=O(N);if(z==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}const kG={name:"flip",enabled:!0,phase:"main",fn:EG,requiresIfExists:["offset"],data:{_skip:!1}};function LM(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[rn,Vn,Nn,sn].some(function(t){return i[t]>=0})}function LG(i){var t=i.state,e=i.name,n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,s=Nh(t,{elementContext:"reference"}),l=Nh(t,{altBoundary:!0}),a=LM(s,n),h=LM(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 FG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:LG};function IG(i,t,e){var n=Ao(i),o=[sn,rn].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,[sn,Vn].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function DG(i){var t=i.state,e=i.options,n=i.name,o=e.offset,r=o===void 0?[0,0]:o,s=wM.reduce(function(d,u){return d[u]=IG(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 OG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:DG};function zG(i){var t=i.state,e=i.name;t.modifiersData[e]=kM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const WG={name:"popperOffsets",enabled:!0,phase:"read",fn:zG,data:{}};function NG(i){return i==="x"?"y":"x"}function VG(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=Nh(t,{boundary:a,rootBoundary:h,padding:u,altBoundary:d}),b=Ao(t.placement),C=zl(t.placement),_=!C,w=qv(b),y=NG(w),S=t.modifiersData.popperOffsets,R=t.rects.reference,A=t.rects.popper,x=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,T=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(S){if(r){var P,F=w==="y"?rn:sn,H=w==="y"?Nn:Vn,E=w==="y"?"height":"width",L=S[w],I=L+m[F],k=L-m[H],D=g?-A[E]/2:0,O=C===Il?R[E]:A[E],N=C===Il?-A[E]:-R[E],z=t.elements.arrow,j=g&&z?Xv(z):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:RM(),Y=$[F],K=$[H],G=zh(0,R[E],j[E]),Q=_?R[E]/2-D-G-Y-T.mainAxis:O-G-Y-T.mainAxis,dt=_?-R[E]/2+D+G+K+T.mainAxis:N+G+K+T.mainAxis,mt=t.elements.arrow&&Oh(t.elements.arrow),St=mt?w==="y"?mt.clientTop||0:mt.clientLeft||0:0,J=(P=M==null?void 0:M[w])!=null?P:0,it=L+Q-J-St,yt=L+dt-J,bt=zh(g?jg(I,it):I,L,g?Rs(k,yt):k);S[w]=bt,B[w]=bt-L}if(l){var lt,ct=w==="x"?rn:sn,ht=w==="x"?Nn:Vn,at=S[y],wt=y==="y"?"height":"width",ut=at+m[ct],zt=at-m[ht],Xt=[rn,sn].indexOf(b)!==-1,vt=(lt=M==null?void 0:M[y])!=null?lt:0,pt=Xt?ut:at-R[wt]-A[wt]-vt+T.altAxis,ie=Xt?at+R[wt]+A[wt]-vt-T.altAxis:zt,le=g&&Xt?cG(pt,at,ie):zh(g?pt:ut,at,g?ie:zt);S[y]=le,B[y]=le-at}t.modifiersData[n]=B}}const jG={name:"preventOverflow",enabled:!0,phase:"main",fn:VG,requiresIfExists:["offset"]};function $G(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function GG(i){return i===_n(i)||!jn(i)?Zv(i):$G(i)}function UG(i){var t=i.getBoundingClientRect(),e=Dl(t.width)/i.offsetWidth||1,n=Dl(t.height)/i.offsetHeight||1;return e!==1||n!==1}function KG(i,t,e){e===void 0&&(e=!1);var n=jn(t),o=jn(t)&&UG(t),r=zr(t),s=Ol(i,o,e),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!e)&&((xo(t)!=="body"||Qv(r))&&(l=GG(t)),jn(t)?(a=Ol(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):r&&(a.x=Jv(r))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function YG(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 XG(i){var t=YG(i);return sG.reduce(function(e,n){return e.concat(t.filter(function(o){return o.phase===n}))},[])}function qG(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function ZG(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 IM={placement:"bottom",modifiers:[],strategy:"absolute"};function DM(){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 JG(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,n=e===void 0?[]:e,o=t.defaultOptions,r=o===void 0?IM:o;return function(l,a,h){h===void 0&&(h=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},IM,r),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},u=[],c=!1,g={state:d,setOptions:function(b){var C=typeof b=="function"?b(d.options):b;p(),d.options=Object.assign({},r,d.options,C),d.scrollParents={reference:As(l)?Wh(l):l.contextElement?Wh(l.contextElement):[],popper:Wh(a)};var _=XG(ZG([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(w){return w.enabled}),f(),g.update()},forceUpdate:function(){if(!c){var b=d.elements,C=b.reference,_=b.popper;if(DM(C,_)){d.rects={reference:KG(C,Oh(_),d.options.strategy==="fixed"),popper:Xv(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(T){return d.modifiersData[T.name]=Object.assign({},T.data)});for(var w=0;w<d.orderedModifiers.length;w++){if(d.reset===!0){d.reset=!1,w=-1;continue}var y=d.orderedModifiers[w],S=y.fn,R=y.options,A=R===void 0?{}:R,x=y.name;typeof S=="function"&&(d=S({state:d,options:A,name:x,instance:g})||d)}}}},update:qG(function(){return new Promise(function(m){g.forceUpdate(),m(d)})}),destroy:function(){p(),c=!0}};if(!DM(l,a))return g;g.setOptions(h).then(function(m){!c&&h.onFirstUpdate&&h.onFirstUpdate(m)});function f(){d.orderedModifiers.forEach(function(m){var b=m.name,C=m.options,_=C===void 0?{}:C,w=m.effect;if(typeof w=="function"){var y=w({state:d,name:b,instance:g,options:_}),S=function(){};u.push(y||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return g}}var QG=[wG,WG,yG,hG,OG,kG,jG,mG,FG],tU=JG({defaultModifiers:QG});function eb(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 OM(i,t){if(i){if(typeof i=="string")return eb(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)?eb(i,t):void 0}}function eU(i){return function(t){if(Array.isArray(t))return eb(t)}(i)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(i)||OM(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 Wl(i){return Wl=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},Wl(i)}function zM(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 WM(i){return function(){var t=this,e=arguments;return new Promise(function(n,o){var r=i.apply(t,e);function s(a){zM(r,n,o,s,l,"next",a)}function l(a){zM(r,n,o,s,l,"throw",a)}s(void 0)})}}var NM={exports:{}},VM={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})(VM),function(i){var t=VM.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(k,D,O){k[D]=O.value},a=typeof Symbol=="function"?Symbol:{},h=a.iterator||"@@iterator",d=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(k,D,O){return Object.defineProperty(k,D,{value:O,enumerable:!0,configurable:!0,writable:!0}),k[D]}try{c({},"")}catch{c=function(D,O,N){return D[O]=N}}function g(k,D,O,N){var z=D&&D.prototype instanceof w?D:w,j=Object.create(z.prototype),$=new L(N||[]);return l(j,"_invoke",{value:P(k,O,$)}),j}function f(k,D,O){try{return{type:"normal",arg:k.call(D,O)}}catch(N){return{type:"throw",arg:N}}}o.wrap=g;var p="suspendedStart",m="suspendedYield",b="executing",C="completed",_={};function w(){}function y(){}function S(){}var R={};c(R,h,function(){return this});var A=Object.getPrototypeOf,x=A&&A(A(I([])));x&&x!==r&&s.call(x,h)&&(R=x);var T=S.prototype=w.prototype=Object.create(R);function M(k){["next","throw","return"].forEach(function(D){c(k,D,function(O){return this._invoke(D,O)})})}function B(k,D){function O(z,j,$,Y){var K=f(k[z],k,j);if(K.type!=="throw"){var G=K.arg,Q=G.value;return Q&&t(Q)=="object"&&s.call(Q,"__await")?D.resolve(Q.__await).then(function(dt){O("next",dt,$,Y)},function(dt){O("throw",dt,$,Y)}):D.resolve(Q).then(function(dt){G.value=dt,$(G)},function(dt){return O("throw",dt,$,Y)})}Y(K.arg)}var N;l(this,"_invoke",{value:function(z,j){function $(){return new D(function(Y,K){O(z,j,Y,K)})}return N=N?N.then($,$):$()}})}function P(k,D,O){var N=p;return function(z,j){if(N===b)throw Error("Generator is already running");if(N===C){if(z==="throw")throw j;return{value:n,done:!0}}for(O.method=z,O.arg=j;;){var $=O.delegate;if($){var Y=F($,O);if(Y){if(Y===_)continue;return Y}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(N===p)throw N=C,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);N=b;var K=f(k,D,O);if(K.type==="normal"){if(N=O.done?C:m,K.arg===_)continue;return{value:K.arg,done:O.done}}K.type==="throw"&&(N=C,O.method="throw",O.arg=K.arg)}}}function F(k,D){var O=D.method,N=k.iterator[O];if(N===n)return D.delegate=null,O==="throw"&&k.iterator.return&&(D.method="return",D.arg=n,F(k,D),D.method==="throw")||O!=="return"&&(D.method="throw",D.arg=new TypeError("The iterator does not provide a '"+O+"' method")),_;var z=f(N,k.iterator,D.arg);if(z.type==="throw")return D.method="throw",D.arg=z.arg,D.delegate=null,_;var j=z.arg;return j?j.done?(D[k.resultName]=j.value,D.next=k.nextLoc,D.method!=="return"&&(D.method="next",D.arg=n),D.delegate=null,_):j:(D.method="throw",D.arg=new TypeError("iterator result is not an object"),D.delegate=null,_)}function H(k){var D={tryLoc:k[0]};1 in k&&(D.catchLoc=k[1]),2 in k&&(D.finallyLoc=k[2],D.afterLoc=k[3]),this.tryEntries.push(D)}function E(k){var D=k.completion||{};D.type="normal",delete D.arg,k.completion=D}function L(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(H,this),this.reset(!0)}function I(k){if(k||k===""){var D=k[h];if(D)return D.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var O=-1,N=function z(){for(;++O<k.length;)if(s.call(k,O))return z.value=k[O],z.done=!1,z;return z.value=n,z.done=!0,z};return N.next=N}}throw new TypeError(t(k)+" is not iterable")}return y.prototype=S,l(T,"constructor",{value:S,configurable:!0}),l(S,"constructor",{value:y,configurable:!0}),y.displayName=c(S,u,"GeneratorFunction"),o.isGeneratorFunction=function(k){var D=typeof k=="function"&&k.constructor;return!!D&&(D===y||(D.displayName||D.name)==="GeneratorFunction")},o.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,S):(k.__proto__=S,c(k,u,"GeneratorFunction")),k.prototype=Object.create(T),k},o.awrap=function(k){return{__await:k}},M(B.prototype),c(B.prototype,d,function(){return this}),o.AsyncIterator=B,o.async=function(k,D,O,N,z){z===void 0&&(z=Promise);var j=new B(g(k,D,O,N),z);return o.isGeneratorFunction(D)?j:j.next().then(function($){return $.done?$.value:j.next()})},M(T),c(T,u,"Generator"),c(T,h,function(){return this}),c(T,"toString",function(){return"[object Generator]"}),o.keys=function(k){var D=Object(k),O=[];for(var N in D)O.push(N);return O.reverse(),function z(){for(;O.length;){var j=O.pop();if(j in D)return z.value=j,z.done=!1,z}return z.done=!0,z}},o.values=I,L.prototype={constructor:L,reset:function(k){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),!k)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 k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var D=this;function O(K,G){return j.type="throw",j.arg=k,D.next=K,G&&(D.method="next",D.arg=n),!!G}for(var N=this.tryEntries.length-1;N>=0;--N){var z=this.tryEntries[N],j=z.completion;if(z.tryLoc==="root")return O("end");if(z.tryLoc<=this.prev){var $=s.call(z,"catchLoc"),Y=s.call(z,"finallyLoc");if($&&Y){if(this.prev<z.catchLoc)return O(z.catchLoc,!0);if(this.prev<z.finallyLoc)return O(z.finallyLoc)}else if($){if(this.prev<z.catchLoc)return O(z.catchLoc,!0)}else{if(!Y)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return O(z.finallyLoc)}}}},abrupt:function(k,D){for(var O=this.tryEntries.length-1;O>=0;--O){var N=this.tryEntries[O];if(N.tryLoc<=this.prev&&s.call(N,"finallyLoc")&&this.prev<N.finallyLoc){var z=N;break}}z&&(k==="break"||k==="continue")&&z.tryLoc<=D&&D<=z.finallyLoc&&(z=null);var j=z?z.completion:{};return j.type=k,j.arg=D,z?(this.method="next",this.next=z.finallyLoc,_):this.complete(j)},complete:function(k,D){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&D&&(this.next=D),_},finish:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var O=this.tryEntries[D];if(O.finallyLoc===k)return this.complete(O.completion,O.afterLoc),E(O),_}},catch:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var O=this.tryEntries[D];if(O.tryLoc===k){var N=O.completion;if(N.type==="throw"){var z=N.arg;E(O)}return z}}throw Error("illegal catch attempt")},delegateYield:function(k,D,O){return this.delegate={iterator:I(k),resultName:D,nextLoc:O},this.method==="next"&&(this.arg=n),_}},o}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports}(NM);var Kg=NM.exports(),Yg=Kg;try{regeneratorRuntime=Kg}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Kg:Function("r","regeneratorRuntime = r")(Kg)}function Nl(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)||OM(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 iU(i){var t=function(e,n){if(Wl(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n||"default");if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return Wl(t)=="symbol"?t:t+""}function ib(i,t,e){return(t=iU(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Xg=v.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=v.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),background:"hsl(".concat(i.hue,", 100%, 50%)")}});return{saturationStyle:n,sliderStyle:v.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 Ro(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))}}Ro(".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}"),Xg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"saturation",style:v.normalizeStyle(i.saturationStyle),onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[t[1]||(t[1]=v.createElementVNode("div",{class:"saturation-white"},null,-1)),t[2]||(t[2]=v.createElementVNode("div",{class:"saturation-black"},null,-1)),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],36)},Xg.__scopeId="data-v-24517fec",Xg.__file="src/picker/Saturation.vue";var qg=v.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=v.computed(function(){return{top:"".concat((1-i.hue/360)*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.ref();return v.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)}}}}),nU={ref:"canvas"};Ro(".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}"),qg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"hue",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",nU,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},qg.__scopeId="data-v-78b9f4f0",qg.__file="src/picker/Hue.vue";var Zg=v.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=v.computed(function(){return{top:"".concat(i.alpha*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.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 v.watch(function(){return i.color},function(){r()}),v.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)}}}}),oU={ref:"canvas"};Ro(".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}"),Zg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"alpha",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",oU,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},Zg.__scopeId="data-v-24dc9656",Zg.__file="src/picker/Alpha.vue";var jM={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},$M={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},rU={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function GM(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 nb(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?GM(Object(e),!0).forEach(function(n){ib(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):GM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}var Ts=null,UM=function(i,t,e){var n=v.ref({}),o=e||{},r=o.placement,s=o.defaultStyle,l={strategy:o.strategy||"absolute",placement:r||"auto",onFirstUpdate:function(){Ts.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=nb(nb(nb({},c),s),{},{transformOrigin:u==="top"?"center bottom":"center top"})}}]};return v.watch(function(){return[v.unref(i),v.unref(t)]},function(a,h){var d,u=Nl(a,2),c=u[0],g=u[1],f=Nl(h,2),p=f[0],m=f[1];if(c&&g&&(p!==c||m!==p)){(d=Ts)===null||d===void 0||d.destroy();var b=c.$el||c,C=g.$el||g;v.nextTick(function(){Ts=tU(b,C,l)})}}),v.onBeforeUnmount(function(){var a;Ts&&((a=Ts)===null||a===void 0||a.destroy(),Ts=null)}),{instance:Ts,style:n}},Jg=v.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=v.ref(null),o=v.ref(null),r=v.ref(!1),s=UM(n,o,{strategy:"fixed",defaultStyle:{zIndex:2}}).style,l=v.computed(function(){return Array.isArray(i.options)&&i.options.length>1}),a=v.computed(function(){var d=i.options,u=i.showAlpha,c=i.value;return Array.isArray(d)?u?d.map(function(g){return jM[g]}).filter(function(g){return!g.includes(c)}):d.map(function(g){return $M[g]}).filter(function(g){return!g.includes(c)}):[]}),h=function(d){var u,c,g=d.target;!((u=v.unref(n))!==null&&u!==void 0&&u.isEqualNode(g))&&(!((c=v.unref(n))===null||c===void 0)&&c.contains(g))||(r.value=!1)};return v.onMounted(function(){document.addEventListener("mouseup",h,!1)}),v.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",rU[d])}}}}),sU={class:"format"},lU={key:0,class:"arrow"},aU=["onClick"];Ro(".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 v.openBlock(),v.createElementBlock("div",sU,[v.createElementVNode("div",{class:"label",ref:"targetRef",onClick:t[0]||(t[0]=function(){return i.onShow&&i.onShow.apply(i,arguments)})},[v.createElementVNode("span",null,v.toDisplayString(i.value),1),i.isNeedSelect?(v.openBlock(),v.createElementBlock("div",lU)):v.createCommentVNode("v-if",!0)],512),v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowSelector?(v.openBlock(),v.createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:v.normalizeStyle(i.selectorStyle)},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.formatOptions,function(s){return v.openBlock(),v.createElementBlock("div",{class:"selector-item",key:s,onClick:function(l){return i.onFormatChange(s)}},v.toDisplayString(s),9,aU)}),128))],4)):v.createCommentVNode("v-if",!0)]}),_:1})])},Jg.__scopeId="data-v-5f6e8f5e",Jg.__file="src/picker/input-value/FormatValue.vue";var Qg=v.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:v.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)}}}}),hU={class:"input"},dU=[".value"];function KM(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 $n(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?KM(Object(e),!0).forEach(function(n){ib(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):KM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}Ro(".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}"),Qg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("FormatValue");return v.openBlock(),v.createElementBlock("div",hU,[v.createVNode(s,{value:i.format,showAlpha:i.showAlpha,options:i.formatOptions,onChange:i.onFormatChange},null,8,["value","showAlpha","options","onChange"]),v.createElementVNode("input",{class:"value",style:v.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]=v.withKeys(function(){return i.onEnter&&i.onEnter.apply(i,arguments)},["enter"]))},null,44,dU)])},Qg.__scopeId="data-v-2c454c00",Qg.__file="src/picker/input-value/InputValue.vue";var YM=function(i,t,e){return[i,t*e/((i=(2-t)*e)<1?i:2-i)||0,i/2]},XM={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},tf=function(i){i=Math.min(Math.round(i),255);var t=Math.floor(i/16),e=i%16;return"".concat(XM[t]||t).concat(XM[e]||e)},qM=function(i){var t=i.r,e=i.g,n=i.b;return isNaN(t)||isNaN(e)||isNaN(n)?"":"#".concat(tf(t)).concat(tf(e)).concat(tf(n))},Vl=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)},Vh=function(i,t,e){i=6*Vl(i,360),t=Vl(t,100),e=Vl(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)}},ZM=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=YM(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=Vh(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(qM(Vh(r,s,l))).concat(tf(255*a))}else switch(t){case"hsl":var f=YM(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=Vh(r,s,l),m=p.r,b=p.g,C=p.b;return"rgb(".concat(m,", ").concat(b,", ").concat(C,")");default:return qM(Vh(r,s,l))}},ef=function(i){var t=i.r,e=i.g,n=i.b;t=Vl(t,255),e=Vl(e,255),n=Vl(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}},JM=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)}},QM=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]}},ob=function(i,t,e){if(typeof i=="string"&&i!==""){var n=nf(i,of(i),e),o=nB(n);return o==null?"":ZM(o,t,e)}return""},tB=function(i){var t=Nl(i.match(/(\d(\.\d+)?)+/g),4);return{r:t[0],g:t[1],b:t[2],a:t[3]}},eB=function(i){var t=Nl(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}},iB=function(i){var t=Nl(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)}},nf=function(i,t){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(t){case"rgb":var e=tB(i),n=e.r,o=e.g,r=e.b,s=e.a;return $n($n({},ef({r:n,g:o,b:r})),{},{a:+s});case"hsv":var l=iB(i);return{h:l.h,s:l.s,v:l.v,a:l.a};case"hsl":var a=eB(i),h=a.h,d=a.s,u=a.l,c=a.a;return $n($n({},JM({h,s:d,l:u})),{},{a:+c});default:var g=QM(i),f=g.r,p=g.g,m=g.b,b=g.a;return $n($n({},ef({r:f,g:p,b:m})),{},{a:b/255})}else switch(t){case"rgb":return $n($n({},ef(tB(i))),{},{a:1});case"hsv":var C=iB(i);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return $n($n({},JM(eB(i))),{},{a:1});default:return $n($n({},ef(QM(i))),{},{a:1})}},of=function(i){return i.match(/^#/)?"hex":i.match(/^rgb/)?"rgb":i.match(/^hsl/)?"hsl":i.match(/^hsv/)?"hsv":"hex"},nB=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})},jh=v.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=v.ref(),e=v.inject("theme",{theme:"light"}).theme,n=v.computed(function(){return parseFloat((i.width||i.size)+"")}),o=v.computed(function(){return parseFloat((i.height||i.size)+"")}),r=v.computed(function(){return{width:"".concat(v.unref(n),"px"),height:"".concat(v.unref(o),"px"),border:i.border?"1px solid ".concat(v.unref(e)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(i.borderRadius,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(v.unref(e)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var l=t.value.getContext("2d");t.value.width=v.unref(n),t.value.height=v.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,v.unref(n),v.unref(o)),l.fillStyle=i.value,l.fillRect(0,0,v.unref(n),v.unref(o))};return v.watch(function(){return i.value},function(){s()}),v.onMounted(function(){s()}),{canvas:t,colorItemStyle:r}}}),uU=["draggable"];Ro(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),jh.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("canvas",{class:"color-item",style:v.normalizeStyle(i.colorItemStyle),ref:"canvas",draggable:i.draggable},null,12,uU)},jh.__scopeId="data-v-02da71fd",jh.__file="src/color-item/ColorItem.vue";var rf=v.defineComponent({name:"Colors",components:{ColorItem:jh},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:v.computed(function(){return i.colors.map(function(n){return ob(n,"hex",!0)})})}}}),cU={class:"colors"};function oB(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 To(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?oB(Object(e),!0).forEach(function(n){ib(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):oB(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}Ro(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),rf.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item");return v.openBlock(),v.createElementBlock("div",cU,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.useColors,function(l,a){return v.openBlock(),v.createBlock(s,{key:a,class:"color-item",size:16,value:l,border:!1,"border-radius":3,selected:i.selectedIndex===a,onClick:v.withModifiers(function(h){return i.onSelectColor(l,+a)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},rf.__scopeId="data-v-0f8b52a8",rf.__file="src/picker/Colors.vue";var sf=v.defineComponent({name:"Picker",components:{Colors:rf,Saturation:Xg,Hue:qg,Alpha:Zg,InputValue:Qg},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=v.computed(function(){return To(To({},i.style),{},{width:i.showAlpha?"230px":"205px"})}),o=v.ref(),r=v.ref(),s=v.ref(),l=function(){var p,m=(p=i.value)===null||p===void 0?void 0:p.trim();if(m!=null&&m!==""){var b=of(m);return nB(nf(m,b,i.showAlpha))}return null};v.watch(function(){return i.value},function(){i.value!==v.unref(s)&&(o.value=l())},{immediate:!0}),v.watch(function(){return[v.unref(o),i.format]},function(p){var m=Nl(p,2),b=m[0],C=m[1],_="";b!=null?(_=ZM(To({},b),i.format,i.showAlpha),r.value=To({},b)):r.value=null,s.value=_;var w=l();JSON.stringify(b)!==JSON.stringify(w)&&JSON.stringify(b)!==JSON.stringify(C)&&e("change",_)},{immediate:!0});var a=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.h)||0}),h=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.s)||0}),d=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.v)||0}),u=v.computed(function(){var p,m;return((p=v.unref(o))===null||p===void 0?void 0:p.a)!=null?(m=v.unref(o))===null||m===void 0?void 0:m.a:1}),c=v.computed(function(){return Vh(v.unref(a),v.unref(h),v.unref(d))}),g=v.computed(function(){return"rgb(".concat(v.unref(c).r,", ").concat(v.unref(c).g,", ").concat(v.unref(c).b,")")}),f=v.ref(-1);return{h:a,s:h,v:d,a:u,rgbStr:g,onSelectSaturation:function(p,m){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:p,v:m,a:v.unref(u)}:o.value=To(To({},v.unref(o)),{},{s:p,v:m})},onSelectHue:function(p){f.value=-1,v.unref(o)==null&&(o.value={h:p,s:v.unref(h),v:v.unref(d),a:v.unref(u)}),o.value=To(To({},v.unref(o)),{},{h:p})},onSelectAlpha:function(p){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:v.unref(h),v:v.unref(d),a:p}:o.value=To(To({},v.unref(o)),{},{a:p})},handleInputFormat:function(p){return i.showAlpha?jM[p]:$M[p]},colorValue:s,pickerStyle:n,onInputChange:function(p){f.value=-1,s.value=p},handleChange:function(){var p,m=(p=v.unref(s))===null||p===void 0?void 0:p.trim();if(m!==""){var b=i.showAlpha,C=of(m),_=nf(m,C,b),w=function(y){var S=y.h,R=y.s,A=y.v,x=y.a;return!(isNaN(S)||isNaN(R)||isNaN(A)||isNaN(x))}(_);w?o.value=_:v.unref(r)!=null?o.value=v.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 b=of(p);b?function(C,_,w){if(C.length!==0){var y=nf(C,_,w),S=y.h,R=y.s,A=y.v;if(!(isNaN(S)||isNaN(R)||isNaN(A))){var x=1,T=y.a;isNaN(T)||(x=T),o.value={h:S,s:R,v:A,a:x}}}}(p,b,!0):o.value=null}},onFormatChange:function(p){e("formatChange",p)}}}}),gU={class:"picker-inner"},fU={class:"picker-header"};Ro(".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}"),sf.render=function(i,t,e,n,o,r){var s=v.resolveComponent("saturation"),l=v.resolveComponent("hue"),a=v.resolveComponent("alpha"),h=v.resolveComponent("input-value"),d=v.resolveComponent("Colors");return v.openBlock(),v.createElementBlock("div",{class:"picker",style:v.normalizeStyle(i.pickerStyle)},[v.createElementVNode("div",gU,[v.createElementVNode("div",fU,[v.createVNode(s,{class:"saturation",hue:i.h,saturation:i.s,value:i.v,onChange:i.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),v.createVNode(l,{class:"hue",hue:i.h,onChange:i.onSelectHue},null,8,["hue","onChange"]),i.showAlpha?(v.openBlock(),v.createBlock(a,{key:0,class:"alpha",alpha:i.a,color:i.rgbStr,onChange:i.onSelectAlpha},null,8,["alpha","color","onChange"])):v.createCommentVNode("v-if",!0)]),v.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?(v.openBlock(),v.createBlock(d,{key:0,class:"colors",colors:i.colors,"selected-index":i.selectColorIndex,onChange:i.onSelectColor},null,8,["colors","selected-index","onChange"])):v.createCommentVNode("v-if",!0)])],4)},sf.__scopeId="data-v-6ceadec6",sf.__file="src/picker/Picker.vue";var lf=v.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(i){var t=v.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:v.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(v.unref(t)==="dark"?"#2681ff":"#1890ff"):""}})}}});Ro(".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}"),lf.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("svg",{class:"add-color-item",style:v.normalizeStyle(i.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[v.createElementVNode("g",{class:"container"},[v.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},lf.__scopeId="data-v-ceb1719c",lf.__file="src/add-color-item/AddColorItem.vue";var af=v.defineComponent({name:"ColorPicker",components:{ColorItem:jh,Picker:sf,AddColorItem:lf},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=v.ref([]),o=v.computed(function(){return v.unref(n).map(function(x){return ob(x,"hex",i.showAlpha)})}),r=v.ref("hex");v.watch(function(){return i.format},function(){r.value=i.format},{immediate:!0}),v.watch(function(){return i.value},function(){var x=i.value||"",T=Array.isArray(x)?x:[x];n.value=T.map(function(M){return ob(M,v.unref(r),i.showAlpha)})},{immediate:!0});var s=v.ref(void 0),l=v.computed(function(){return v.unref(n)[v.unref(s)]}),a=v.ref(!1);v.watch(function(){return i.showPicker},function(){a.value=i.showPicker},{immediate:!0});var h,d,u=v.ref(null),c=v.ref(null),g=UM(u,c,{defaultStyle:{zIndex:i.zIndex},strategy:i.position,placement:i.placement}).style,f=function(){v.unref(u)==null&&(u.value=v.unref(A)[0]),v.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",v.toRaw(Array.isArray(i.value)||i.addColor?v.unref(n):v.unref(n)[0]))},m=v.ref(),b=function(){var x=WM(Yg.mark(function T(M){var B,P,F,H;return Yg.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(P=M.target,(F=(B=P.dataset)===null||B===void 0?void 0:B.index)!=null&&F!==""){E.next=4;break}return E.abrupt("return");case 4:if(H=+F,v.unref(s)!==H){E.next=7;break}return E.abrupt("return");case 7:v.unref(s)!=null&&v.unref(s)!==H?(p(),h&&clearTimeout(h),h=setTimeout(function(){f(),clearTimeout(h)},100)):f(),s.value=H,u.value=P;case 10:case"end":return E.stop()}},T)}));return function(T){return x.apply(this,arguments)}}(),C=function(){var x=WM(Yg.mark(function T(M){var B,P,F,H,E;return Yg.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(H=M.target,!(!((B=v.unref(m))!==null&&B!==void 0&&B.isEqualNode(H))&&(!((P=v.unref(m))===null||P===void 0)&&P.contains(H)))){L.next=4;break}return L.abrupt("return");case 4:if(E=(F=v.unref(c))===null||F===void 0?void 0:F.$el,!(E!=null&&E.contains(H))){L.next=8;break}return L.abrupt("return");case 8:d&&clearTimeout(d),d=setTimeout(function(){v.unref(a)&&p()},0);case 10:case"end":return L.stop()}},T)}));return function(T){return x.apply(this,arguments)}}();v.watch(a,function(){v.unref(a)&&(f(),clearTimeout(d))});var _,w=v.ref(i.max>v.unref(n).length),y=v.computed(function(){return typeof i.popupContainer=="string"||Wl(i.popupContainer)==="object"&&i.popupContainer!=null?i.popupContainer:"body"}),S=v.computed(function(){return typeof i.popupContainer=="boolean"&&i.popupContainer===!1}),R=v.computed(function(){return i.theme});v.watch(function(){return[i.theme,v.unref(c)]},function(){v.nextTick(function(){var x,T;(x=v.unref(m))===null||x===void 0||x.setAttribute("pick-colors-theme",v.unref(R)),(T=v.unref(c))===null||T===void 0||(T=T.$el)===null||T===void 0||T.setAttribute("pick-colors-theme",v.unref(R))})},{immediate:!0}),v.provide("theme",{theme:R});var A=v.ref([]);return v.onMounted(function(){document.addEventListener("mouseup",C,!1),i.showPicker&&f()}),v.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?v.unref(n).length>0:v.unref(n).length>1)&&v.unref(s)===x},selectedColor:l,selectedIndex:s,isShowPicker:a,addColorItemShow:w,onPickerChange:function(x){var T=v.unref(s),M=v.unref(n).slice(),B=v.unref(n).length;if(T!=null){T>=0?M[T]=x:(s.value=B,M.push(x));var P="";P=Array.isArray(i.value)||i.addColor?M:x,n.value=Array.isArray(P)?P:[P],e("update:value",P),e("change",P,x,T),i.addColor&&B>=i.max&&(w.value=!1,e("overflowMax"))}},colorPicker:m,onColorClick:b,pickerRef:c,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var T=x.target;_=+T.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var T=+x.target.dataset.index,M=eU(v.unref(n)),B=M[_];M.splice(_,1);var P=M.slice(0,T),F=M.splice(T),H=P.concat([B]).concat(F);e("update:value",H),e("change",H,H[_],_)},colorItemsRef:A,pickerStyle:g,values:o,teleportDisabled:S,toPopupContainer:y,formatValue:r,onFormatChange:function(x){r.value=x,e("formatChange",x)}}}});Ro(".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)}"),af.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item"),l=v.resolveComponent("add-color-item"),a=v.resolveComponent("picker");return v.openBlock(),v.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:t[0]||(t[0]=v.withModifiers(function(){return i.onColorItemDragStart&&i.onColorItemDragStart.apply(i,arguments)},["stop"])),onDragover:t[1]||(t[1]=v.withModifiers(function(){return i.onColorItemDragOver&&i.onColorItemDragOver.apply(i,arguments)},["prevent","stop"])),onDrop:t[2]||(t[2]=v.withModifiers(function(){return i.onColorItemDrop&&i.onColorItemDrop.apply(i,arguments)},["prevent","stop"])),onClick:t[3]||(t[3]=v.withModifiers(function(){return i.onColorClick&&i.onColorClick.apply(i,arguments)},["stop"]))},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.values,function(h,d){return v.openBlock(),v.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?(v.openBlock(),v.createBlock(l,{key:0,class:"add-color-item",ref:"addColorItem",selected:i.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):v.createCommentVNode("v-if",!0),(v.openBlock(),v.createBlock(v.Teleport,{to:i.toPopupContainer,disabled:i.teleportDisabled},[v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowPicker?(v.openBlock(),v.createBlock(a,{key:0,class:"picker",style:v.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"])):v.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},af.__scopeId="data-v-3c43ade8",af.__file="src/ColorPicker.vue";const vX="",pU=v.defineComponent({name:"ColorPick",components:{PickColors:af},props:{value:{type:String,default:""}},setup(i,{emit:t}){const e=v.ref(i.value);v.watch(()=>i.value,o=>{e.value=o},{immediate:!0});function n(){t("changeProp",v.unref(e))}return{myValue:e,onChange:n}}}),mU={class:"color-pick"};function vU(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("pick-colors");return v.openBlock(),v.createElementBlock("div",mU,[v.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"]),v.createVNode(l,{value:i.myValue,"onUpdate:value":t[1]||(t[1]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"])])}const bU=Ti(pU,[["render",vU],["__scopeId","data-v-99378939"]]),CU=v.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 yU(i,t,e,n,o,r){const s=v.resolveComponent("a-radio-group");return v.openBlock(),v.createBlock(s,{value:i.value,size:"small",onChange:i.onChange,options:i.options,optionType:"button"},null,8,["value","onChange","options"])}const _U=Ti(CU,[["render",yU]]),bX="",wU=v.defineComponent({name:"PropertyConfig",components:{ColorPick:bU,Radio:_U},props:{config:{type:Object,default(){return{}}},selectedIndex:{type:Boolean}},setup(i){const t=v.inject("theme","light"),e=[{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"}],n=v.ref([]);v.watch(()=>i.selectedIndex,()=>{if(i.selectedIndex>-1){const l=Object.keys(i.config);n.value=l}});function o(l,a){i.config[l]=a}function r(l,a){if(l.target.checked)i.config[a]="",v.unref(n).push(a);else{delete i.config[a];const h=v.unref(n).indexOf(a);v.unref(n).splice(h,1)}}const s=v.computed(()=>v.unref(t)==="darkBlue"?"#b2c3dd":"");return{formConfig:e,handleSelect:r,selectedProperty:n,onChange:o,fontColor:s}}}),SU={class:"content"},xU={class:"list"};function AU(i,t,e,n,o,r){const s=v.resolveComponent("a-checkbox");return v.openBlock(),v.createElementBlock("div",SU,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor,height:"32px",lineHeight:"32px"})},"属性配置",4),v.createElementVNode("div",xU,[i.selectedIndex>-1?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:0},v.renderList(i.formConfig,({label:l,component:a,props:h,key:d},u)=>(v.openBlock(),v.createElementBlock("div",{class:"list-item",style:{display:"flex"},key:u},[v.createVNode(s,{checked:i.selectedProperty.includes(d),onChange:c=>i.handleSelect(c,d)},null,8,["checked","onChange"]),v.createElementVNode("span",{style:v.normalizeStyle({padding:"0 8px",color:i.fontColor})},v.toDisplayString(l),5),i.selectedProperty.includes(d)?(v.openBlock(),v.createBlock(v.resolveDynamicComponent(a),v.mergeProps({key:0,value:i.config[d],ref_for:!0},h,{onChangeProp:c=>i.onChange(d,c)}),null,16,["value","onChangeProp"])):v.createCommentVNode("",!0)]))),128)):v.createCommentVNode("",!0)])])}const RU=Ti(wU,[["render",AU],["__scopeId","data-v-b2df2e2d"]]),TU=v.defineComponent({name:"ConditionalProperty",props:{},components:{ConditionalItemConfig:N$,ConditionalConfig:Y$,PropertyConfig:RU},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref([]),r=v.ref(-1),s=v.inject("theme","light"),l=v.inject("getContainer",()=>{});let a="";const h=v.computed(()=>v.unref(r)>-1?v.unref(o)[v.unref(r)]:{});function d(f,p=[]){a=f,o.value=p,n.value=!0}function u(f){r.value=f}function c(){t("change",a,v.unref(o)),r.value=-1,n.value=!1}function g(){r.value=-1,o.value=[]}return v.watch(n,f=>{window.modalShow&&window.modalShow(f)}),e({showModal:d}),{theme:s,visible:n,config:o,changeSelectedItem:u,selectedConfig:h,selectedIndex:r,handleOk:c,handleClear:g,getContainer:l}}}),MU={style:{display:"flex"}};function BU(i,t,e,n,o,r){const s=v.resolveComponent("conditional-item-config"),l=v.resolveComponent("conditional-config"),a=v.resolveComponent("property-config"),h=v.resolveComponent("a-button"),d=v.resolveComponent("a-modal");return v.openBlock(),v.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,getContainer:i.getContainer,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(h,{onClick:t[0]||(t[0]=u=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(h,{onClick:i.handleClear},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("清除筛选")])),_:1},8,["onClick"]),v.createVNode(h,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[4]||(t[4]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",MU,[v.createVNode(s,{config:i.config,onChange:i.changeSelectedItem},null,8,["config","onChange"]),v.createVNode(l,{config:i.selectedConfig.conditions,isSelected:i.selectedIndex>-1},null,8,["config","isSelected"]),v.createVNode(a,{config:i.selectedConfig,selectedIndex:i.selectedIndex},null,8,["config","selectedIndex"])])]),_:1},8,["wrapClassName","visible","getContainer","onOk"])}const PU=Ti(TU,[["render",BU]]),CX="",HU=v.defineComponent({name:"PivotChart",props:{data:{type:Object,default(){return{dimensionData:{},xLabel:"",yLabel:""}}}},components:{FilterOutlined:rM,MinusSquareOutlined:p$,PivotFilter:BT},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.ref();let o;const r=v.ref([]),s=v.computed(()=>{var H;return(H=v.unref(r)[v.unref(r).length-1])==null?void 0:H.key}),l=v.ref([]),a=v.ref(!1),h=v.ref(),d=v.ref({});let u={};const c=v.reactive({position:"absolute",top:"0",left:"0"});let g="",f;function p(){l.value=[],r.value=[],u={};const{dimensionData:H,xLabel:E}=i.data,L=H[E].map(I=>I.value);b(E,L),v.unref(r).push({key:E,drillValue:"",xAxisData:L}),C()}let m=[];v.onMounted(()=>{o=MB.init(n.value),w()});function b(H,E){const{yLabel:L,records:I}=i.data;let k=[];E.forEach(()=>{k.push(0)}),I.forEach(D=>{if(D[L]!==void 0){const O=E.indexOf(D[H]);if(O>-1){let N=!0;v.unref(r).forEach(j=>{j.drillValue&&D[j.key]!==j.drillValue&&(N=!1)});const z=Number(D[L]);N&&!isNaN(z)&&(k[O]+=Number(z))}}}),k=k.map(D=>D.toFixed(2)),f={tooltip:{},xAxis:{data:E},yAxis:{},series:[{name:L,type:"bar",label:{show:!0,position:"top"},data:k}]},m=k,o.setOption(f)}function C(){const H=Object.keys(i.data.dimensionData),E=v.unref(r).map(I=>I.key),L=[];H.forEach(I=>{E.includes(I)||L.push(I)}),l.value=L}function _(){g="",a.value=!1}function w(){o.on("contextmenu",function(H){const{event:{event:E},name:L}=H;g=L,E.preventDefault(),c.left=E.offsetX+90+"px",c.top=E.offsetY+80+"px",a.value=!0}),document.addEventListener("click",_)}function y(H){const E=[],{records:L}=i.data;for(const I of L){let k=!0;for(const D of v.unref(r))D.drillValue&&I[D.key]!==D.drillValue&&(k=!1);k&&!E.includes(I[H])&&E.push(I[H])}return E}function S(H){v.unref(r)[v.unref(r).length-1].drillValue=g;const E=y(H);b(H,E),v.unref(r).push({key:H,drillValue:"",xAxisData:E}),C()}function R(H,E){v.unref(r).splice(H+1,v.unref(r).length-H-1),v.unref(r)[H].drillValue="";const L=y(E);b(E,L),B(),C()}function A(H,E){const L=f.series[0].data,I=f.xAxis.data,k=L.map((O,N)=>({value:O,label:I[N]}));let D;E==="asc"?H==="dimension"?D=k.sort((O,N)=>O.label.localeCompare(N.label)):D=k.sort((O,N)=>O.value-N.value):E==="desc"&&(H==="dimension"?D=k.sort((O,N)=>N.label.localeCompare(O.label)):D=k.sort((O,N)=>N.value-O.value)),f.series[0].data=D.map(O=>O.value),f.xAxis.data=D.map(O=>O.label),o.setOption(f)}function x(H){if(H==="dimension"){const E=y(v.unref(s));b(v.unref(s),E),B()}else u={},B()}function T(H){if(H==="dimension"){const E=v.unref(r)[v.unref(r).length-1].xAxisData.map(L=>({value:L}));d.value={fieldName:v.unref(s),key:v.unref(s),type:H,filterData:f.xAxis.data,valueList:E}}else H==="indicators"&&(d.value={fieldName:i.data.yLabel,key:i.data.yLabel,type:"indicators",filterData:u});v.nextTick(()=>{v.unref(h).showModal()})}function M({checkKeys:H,type:E}){E==="dimension"?b(v.unref(s),H):E==="indicators"&&(u=H,B())}function B(){const H=v.unref(r)[v.unref(r).length-1].xAxisData;let E=m.map((L,I)=>({value:L,label:H[I]}));E=E.filter(L=>P(L.value)),f.series[0].data=E.map(L=>L.value),f.xAxis.data=E.map(L=>L.label),o.setOption(f)}function P(H){let E=!1,{rule:L,value:I}=u;switch(I=Number(I),L){case"LESS":E=H<I;break;case"GREATER":E=H>I;break;case"EQUAL":E=H===I;break;case"NOT_EQUAL":E=H!==I;break;default:E=!0;break}return E}v.onBeforeUnmount(()=>{document.removeEventListener("click",_)}),t({init:p});const F=v.computed(()=>v.unref(e)==="darkBlue"?"#b2c3dd":"");return{echartRef:n,dropdownList:l,isShowMenu:a,curXLabel:s,menuStyle:c,drillDimension:S,dimensionMap:r,deleteDimension:R,handleSort:A,handleClear:x,handleFilter:T,pivotFilterRef:h,filterData:d,onFilterChange:M,fontColor:F}}}),EU={style:{display:"flex",height:"400px"}},kU={style:{flex:"0 0 200px"}},LU={style:{flex:"0 0 650px",height:"100%"}},FU={key:0,style:{display:"flex","align-items":"center"}},IU={key:0,class:"dimension-item"},DU={key:1,style:{height:"30px"}},OU={style:{width:"100%",height:"100%"},ref:"echartRef"},zU=["onClick"];function WU(i,t,e,n,o,r){const s=v.resolveComponent("filter-outlined"),l=v.resolveComponent("a-menu-item"),a=v.resolveComponent("a-menu"),h=v.resolveComponent("a-dropdown"),d=v.resolveComponent("minus-square-outlined"),u=v.resolveComponent("pivot-filter");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",EU,[v.createElementVNode("div",kU,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 横轴:"+v.toDisplayString(i.curXLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[0]||(t[0]=c=>i.handleSort("dimension","asc"))},{default:v.withCtx(()=>t[8]||(t[8]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[1]||(t[1]=c=>i.handleSort("dimension","desc"))},{default:v.withCtx(()=>t[9]||(t[9]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[2]||(t[2]=c=>i.handleFilter("dimension"))},{default:v.withCtx(()=>t[10]||(t[10]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[3]||(t[3]=c=>i.handleClear("dimension"))},{default:v.withCtx(()=>t[11]||(t[11]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4),v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 纵轴:"+v.toDisplayString(i.data.yLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[4]||(t[4]=c=>i.handleSort("indicators","asc"))},{default:v.withCtx(()=>t[12]||(t[12]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[5]||(t[5]=c=>i.handleSort("indicators","desc"))},{default:v.withCtx(()=>t[13]||(t[13]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[6]||(t[6]=c=>i.handleFilter("indicators"))},{default:v.withCtx(()=>t[14]||(t[14]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[7]||(t[7]=c=>i.handleClear("indicators"))},{default:v.withCtx(()=>t[15]||(t[15]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4)]),v.createElementVNode("div",LU,[i.dimensionMap.length>1?(v.openBlock(),v.createElementBlock("div",FU,[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},"钻取维度:",4),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dimensionMap,(c,g)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:g},[c.drillValue?(v.openBlock(),v.createElementBlock("div",IU,[v.createVNode(d,{class:"dimension-icon",onClick:f=>i.deleteDimension(g,c.key)},null,8,["onClick"]),v.createTextVNode(v.toDisplayString(c.key)+"("+v.toDisplayString(c.drillValue)+") ",1)])):v.createCommentVNode("",!0)],64))),128))])):(v.openBlock(),v.createElementBlock("div",DU)),v.createElementVNode("div",OU,null,512)]),v.withDirectives(v.createElementVNode("div",{style:v.normalizeStyle(i.menuStyle),class:"dropdown-menu"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dropdownList,c=>(v.openBlock(),v.createElementBlock("div",{class:"item",key:c,onClick:g=>i.drillDimension(c)},"下钻"+v.toDisplayString(c),9,zU))),128))],4),[[v.vShow,i.isShowMenu]])]),v.createVNode(u,{ref:"pivotFilterRef",data:i.filterData,onChange:i.onFilterChange},null,8,["data","onChange"])],64)}const NU=Ti(HU,[["render",WU],["__scopeId","data-v-f29855b0"]]),VU=v.defineComponent({components:{PivotChart:NU},name:"ChartModal",props:{},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.inject("getContainer",()=>{}),o=v.ref(!1),r=v.ref({}),s=v.ref();function l(a){r.value=a,o.value=!0,v.nextTick(()=>{s.value.init()})}return v.watch(o,a=>{window.modalShow&&window.modalShow(a)}),t({showModal:l}),{theme:e,visible:o,chartOptions:r,chartRef:s,getContainer:n}}});function jU(i,t,e,n,o,r){const s=v.resolveComponent("pivot-chart"),l=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(l,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=a=>i.visible=a),title:"图形",style:{width:"900px"},destroyOnClose:!0,footer:null,getContainer:i.getContainer},{default:v.withCtx(()=>[v.createVNode(s,{data:i.chartOptions,ref:"chartRef"},null,8,["data"])]),_:1},8,["wrapClassName","visible","getContainer"])}const $U=Ti(VU,[["render",jU]]),GU=v.defineComponent({name:"PivotAggregate",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("dimensionFieldList",[]),r=v.ref(!1),s=v.ref([]),l=v.ref(""),a=v.ref(""),h=[{label:"合计",value:"SUM"},{label:"平均值",value:"AVG"},{label:"计数",value:"COUNT"},{label:"最大值",value:"MAX"},{label:"最小值",value:"MIN"},{label:"方差",value:"VAR"},{label:"标准差",value:"STDEV"}];function d(){t("confirm",v.unref(s),l.value),r.value=!1}function u(g,f){s.value=Xe.cloneDeep(g),l.value=f,r.value=!0;const p=v.unref(o).find(m=>m.label===f);a.value=(p==null?void 0:p.title)||f}const c=()=>document.getElementsByClassName("aggregate-modal")[0]||document.body;return v.watch(r,g=>{window.modalShow&&window.modalShow(g)}),e({showModal:u}),{theme:n,visible:r,aggregationType:s,options:h,dimensionKey:l,titleText:a,handleOk:d,getPopupContainer:c}}});function UU(i,t,e,n,o,r){const s=v.resolveComponent("a-select"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.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.titleText+"-聚合",destroyOnClose:!1,maskClosable:!1,onOk:i.handleOk,onCancel:t[2]||(t[2]=d=>i.visible=!1)},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"聚合方式"},{default:v.withCtx(()=>[v.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 KU=Ti(GU,[["render",UU]]),YU=v.defineComponent({name:"PivotTop",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("getContainer",()=>{}),r=v.ref(!1),s=v.ref(""),l=v.ref("");function a(){t("confirm",{value:v.unref(s),key:v.unref(l)}),r.value=!1}function h(d){const{value:u,key:c}=d;s.value=u,r.value=!0,l.value=c}return v.watch(r,d=>{window.modalShow&&window.modalShow(d)}),e({showModal:h}),{theme:n,visible:r,topNum:s,handleOk:a,getContainer:o}}});function XU(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.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,getContainer:i.getContainer,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"维度取Top"},{default:v.withCtx(()=>[v.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","getContainer","onOk"])}const qU=Ti(YU,[["render",XU]]);let Ms=(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 yX="";Ho.locale("zh-cn");const ZU=v.defineComponent({name:"PivotDetail",components:{ATable:Vi.Table},props:{},setup(i,{emit:t,expose:e}){const n=v.inject("getContainer",()=>{}),o=v.inject("theme","light"),r=v.inject("pageId",""),s=v.inject("context",""),l=v.inject("indicatorUrl",""),a=v.inject("indicatorToken",""),h=v.inject("theDateInfo",{}),d=v.ref(!1),u=v.ref(!1),c=v.ref([]),g=v.ref([]),f=v.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showTotal:b=>`共 ${b} 条数据`});async function p(b){var x;u.value=!0,d.value=!0;const{args:C={},dimension:_,indicator:w,splitSymbol:y}=b,{originData:S=[],cellHeaderPaths:{colHeaderPaths:R=[],rowHeaderPaths:A=[]}}=C;if(S!=null&&S.length){const T=S[0],M=R!=null&&R.length?R[R.length-1]:"",B=R.filter(O=>O.dimensionKey).concat(A.filter(O=>O.dimensionKey)).map(O=>O.dimensionKey);if(!(M!=null&&M.indicatorKey)||!B.length)return;const P=w.find(O=>O.label===M.indicatorKey),F={};for(const O of _)if(B.includes(O.label)){const z=(T[O.label]||"").split(y)||[];F[O.typeGuid]=z!=null&&z.length?z[z.length-1]:""}const{startTime:H,endTime:E,rangeFormat:L}=v.unref(h);H&&E&&(F.startTime=Ho(H).format(L),F.endTime=Ho(E).format(L));const I=await Dr.post(`${v.unref(l)}/diagram/obtainDataSetData`,{pageId:v.unref(r),indexCode:(P==null?void 0:P.indexCode)||"",param:F},{headers:{Authentication:v.unref(a),operateContext:v.unref(s)}}),{columns:k=[],data:D=[]}=((x=I==null?void 0:I.data)==null?void 0:x.data)||{};c.value=k.filter(O=>O).map(O=>({title:O,dataIndex:O})),g.value=D.map(O=>({...O,uid:Ms(6)}))}u.value=!1}v.watch(d,b=>{window.modalShow&&window.modalShow(b)});const m=b=>{v.unref(f).current=b.current};return e({showModal:p}),{theme:o,visible:d,loading:u,pagination:f,columns:c,dataSource:g,handleTableChange:m,getContainer:n}}}),JU={key:0,class:"spin-container"};function QU(i,t,e,n,o,r){const s=v.resolveComponent("a-spin"),l=v.resolveComponent("a-table"),a=v.resolveComponent("a-modal");return v.openBlock(),v.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"},getContainer:i.getContainer},{default:v.withCtx(()=>[i.loading?(v.openBlock(),v.createElementBlock("div",JU,[v.createVNode(s,{size:"large"})])):v.createCommentVNode("",!0),i.loading?v.createCommentVNode("",!0):(v.openBlock(),v.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","getContainer"])}const tK=Ti(ZU,[["render",QU],["__scopeId","data-v-32537b22"]]),eK=(i,t)=>{i.register.icon("dropdownIcon",{type:"svg",svg:`<svg width="${t.downSize}" height="${t.downSize}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><rect x="2" y="1" width="20" height="20" rx="10" fill="white"/><rect x="2.5" y="1.5" width="19" height="19" rx="9.5" stroke="#959DA5"/></g><path d="M14.9492 9.39531C15.0086 9.31911 15.0165 9.21887 14.9698 9.1356C14.923 9.05234 14.8294 9 14.7273 9L9.27273 9C9.17057 9 9.07697 9.05234 9.03023 9.1356C8.98348 9.21887 8.99142 9.31911 9.0508 9.39531L11.7781 12.8953C11.8293 12.961 11.9119 13 12 13C12.0881 13 12.1707 12.961 12.2219 12.8953L14.9492 9.39531Z" fill="#4F5965"/></svg>`,width:t.downSize,height:t.downSize,funcType:i.TYPES.IconFuncTypeEnum.dropDown,positionType:i.TYPES.IconPosition.absoluteRight,name:"dropdownIcon",marginRight:0,hover:{width:t.downSize,height:t.downSize,bgColor:"rgba(101, 117, 168, 0.1)",image:`<svg width="${t.downSize}" height="${t.downSize}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><rect x="2" y="1" width="20" height="20" rx="10" fill="#1E54C9"/><rect x="2.5" y="1.5" width="19" height="19" rx="9.5" stroke="#141414" stroke-opacity="0.2"/></g><path d="M14.9492 9.39531C15.0086 9.31911 15.0165 9.21887 14.9698 9.1356C14.923 9.05234 14.8294 9 14.7273 9L9.27273 9C9.17057 9 9.07697 9.05234 9.03023 9.1356C8.98348 9.21887 8.99142 9.31911 9.0508 9.39531L11.7781 12.8953C11.8293 12.961 11.9119 13 12 13C12.0881 13 12.1707 12.961 12.2219 12.8953L14.9492 9.39531Z" fill="white"/></svg>`},cursor:"pointer",visibleTime:"mouseenter_cell"}),i.register.icon("sortDown",{name:"sortDown",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:t.iconSize,visibleTime:"always",height:t.iconSize,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:t.hoverSize,height:t.hoverSize,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"取消排序",placement:"top"}}),i.register.icon("sortUp",{name:"sortUp",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:t.iconSize,visibleTime:"always",height:t.iconSize,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:t.hoverSize,height:t.hoverSize,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击降序",placement:"top"}}),i.register.icon("sortNormal",{name:"sortNormal",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:t.iconSize,visibleTime:"always",height:t.iconSize,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:t.hoverSize,height:t.hoverSize,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击升序",placement:"top"}})},iK=v.defineComponent({props:{node:{type:[Object,String],required:!0}},render(){return this.node}}),nK={mounted(i){i.focus()}},oK=v.defineComponent({name:"PivotConfig",directives:{focus:nK},props:{fullMode:{type:Boolean,default:!1}},components:{VNodeRender:iK,draggable:Ab,DeleteOutlined:nM},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("getContainer",()=>{}),r=v.ref(!1),s=v.ref(),l=v.ref([]),a=v.ref([{title:"行维度",icon:v.createVNode(o$),fields:[]},{title:"列维度",icon:v.createVNode(t$),fields:[]},{title:"指标",icon:v.createVNode(P$),fields:[]}]),h=(R=[],A=[])=>{for(const x of v.unref(a))x.fields=[];for(const x of R)x.positionType==="rows"?v.unref(a)[0].fields.push(Xe.cloneDeep(x)):x.positionType==="columns"&&v.unref(a)[1].fields.push(Xe.cloneDeep(x));v.unref(a)[2].fields=Xe.cloneDeep(A),r.value=!0},d=v.computed(()=>[...v.unref(a)[0].fields.map(R=>({...R,label:R.showTitle,positionType:"rows"})),...v.unref(a)[1].fields.map(R=>({...R,label:R.showTitle,positionType:"columns"}))]),u=v.computed(()=>v.unref(a)[2].fields),c=()=>{l.value=[],t("confirm",v.unref(d),v.unref(u)),r.value=!1},g=(R,A)=>{const x=A[R.oldIndex],{scope:T}=x;["IDX","BUILT_IN_IDX"].includes(T)?l.value=[0,1]:["DIM","BUILT_IN_DIM"].includes(T)&&(l.value=[2])},f=()=>{l.value=[]},p=()=>{a.value=Xe.cloneDeep(v.unref(a))},m=(R,A)=>{v.unref(a)[R].fields.splice(A,1)},b=v.ref(),C=v.ref(),_=v.ref(""),w=(R,A)=>{i.fullMode&&(b.value=`${R}_${A}`,C.value=Xe.cloneDeep(v.unref(a)[R].fields[A]))},y=()=>{if(v.unref(_)){const R=v.unref(b).split("_");Vi.message.error(v.unref(_)),v.unref(a)[R[0]].fields[R[1]].showTitle=v.unref(C).showTitle,_.value=""}b.value=""},S=R=>{const A=R.target.value,x=v.unref(d).concat(v.unref(u));A?x.find(M=>M.name!==v.unref(C).name&&M.showTitle===A)&&(_.value="名称不能重复"):_.value="不能为空"};return v.watch(r,R=>{window.modalShow&&window.modalShow(R)}),e({showModal:h}),{theme:n,visible:r,fieldAreas:a,indSourceRef:s,maskList:l,currentEditItem:b,handleOk:c,onDragAreaStart:g,onDragEnd:f,handleDeleteField:m,handleEdit:w,onConfirmLabel:y,onDragAdd:p,onChangeLabel:S,getContainer:o}}}),_X="",rK={class:"config-wrap"},sK={class:"area-content"},lK={class:"area-title"},aK={class:"field-item"},hK=["onClick"];function dK(i,t,e,n,o,r){const s=v.resolveComponent("v-node-render"),l=v.resolveComponent("a-input"),a=v.resolveComponent("delete-outlined"),h=v.resolveComponent("draggable"),d=v.resolveComponent("a-button"),u=v.resolveComponent("a-modal"),c=v.resolveDirective("focus");return v.openBlock(),v.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},getContainer:i.getContainer,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(d,{onClick:t[0]||(t[0]=g=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(d,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",rK,[v.createElementVNode("div",sK,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.fieldAreas,(g,f)=>(v.openBlock(),v.createElementBlock("div",{class:"area-item",key:f},[v.createElementVNode("div",lK,[v.createVNode(s,{class:"area-icon",node:g.icon},null,8,["node"]),v.createTextVNode(" "+v.toDisplayString(g.title),1)]),v.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:v.withCtx(({index:p,element:m})=>[v.createElementVNode("div",aK,[i.currentEditItem===`${f}_${p}`?v.withDirectives((v.openBlock(),v.createBlock(l,{key:0,size:"small",value:m.showTitle,"onUpdate:value":b=>m.showTitle=b,onPressEnter:i.onConfirmLabel,onBlur:i.onConfirmLabel,onChange:i.onChangeLabel},null,8,["value","onUpdate:value","onPressEnter","onBlur","onChange"])),[[c]]):(v.openBlock(),v.createElementBlock("div",{key:1,style:{width:"100%"},onClick:b=>i.handleEdit(f,p)},v.toDisplayString(m.showTitle),9,hK)),i.fullMode?(v.openBlock(),v.createBlock(a,{key:2,style:{color:"red","padding-left":"8px"},onClick:b=>i.handleDeleteField(f,p)},null,8,["onClick"])):v.createCommentVNode("",!0)])]),_:2},1032,["list","disabled","onStart","onEnd","onAdd"])]))),128))])])]),_:1},8,["wrapClassName","visible","getContainer","onOk"])}const uK=Ti(oK,[["render",dK],["__scopeId","data-v-b39c2a7b"]]),cK=v.defineComponent({name:"IndSourceList",components:{CaretRightOutlined:Bj,CaretDownOutlined:Aj,LoadingOutlined:a$,Draggable:Ab},props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},isSub:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1}},setup(i,{emit:t,expose:e}){const n=v.inject("indicatorUrl",""),o=v.inject("indicatorToken",""),r=v.inject("pageId",""),s=v.inject("setItemDisabled",S=>!1),l=v.ref([]),a=v.ref(),h=v.reactive({pageSize:20,currentPage:1,totalResult:0}),d=v.ref(!1),u=v.ref(""),c=v.ref(!1);v.watch(()=>i.data,S=>{i.isSub&&(S==null||S.forEach(R=>{var A;R!=null&&R.isLeaf||(A=R.dataViewColumns)==null||A.forEach(x=>{x.show=!0,x.edit=!1,x.title&&(x.label=x.title)})}),l.value=S)},{deep:!0,immediate:!0});const g=()=>{var S;i.isSub||(S=v.unref(a))==null||S.removeEventListener("scroll",_)},f=async S=>{var A;if(v.unref(d))return;d.value=!0;const R={source:i.config.source||"INDICATOR_LIB",pageId:v.unref(r),dataSourceId:i.config.dataSourceId||"",indexName:u.value};S?(S.loading=!0,R.indexTypeGuid=S.indexTypeGuid,R.isLeaf=S.isLeaf):h&&(R.queryRequest={pageSize:h.pageSize,pageNum:h.currentPage});try{const x=await Dr.post(`${v.unref(n)}/diagram/sourceList`,R,{headers:{Authentication:o,operateContext:"ygt"}}),{success:T,data:M={}}=x.data;if(T){const{rows:B=[],total:P=0}=M;B==null||B.forEach(F=>{var H;(S==null?void 0:S.isLeaf)==="1"?(H=F.dataViewColumns)==null||H.forEach(E=>{E.show=!0,E.edit=!1,E.title&&(E.label=E.title)}):F.show=!1}),S?(S.children=B,S.show=!0,B!=null&&B.length||(S.noData=!0)):(l.value=v.unref(l).concat(B),h.totalResult=+P,((A=v.unref(l))==null?void 0:A.length)>=P&&g())}S&&(S.loading=!1),d.value=!1}catch{S&&(S.loading=!1),d.value=!1}},p=async S=>{const R=l.value[S],{children:A=[]}=R;A!=null&&A.length?R.show=!R.show:!R.noData&&R.isLeaf?f(R):R.noData&&(R.show=!R.show)},m=(S,R)=>{t("onDragStart",S,R)},b=()=>{t("onDragEnd")},C=S=>{S.show=!S.show},_=S=>{S.target.scrollTop+S.target.clientHeight+20>=S.target.scrollHeight&&(h.currentPage++,f())},w=async()=>{await f(),v.nextTick(async()=>{v.unref(a).scrollHeight===v.unref(a).clientHeight&&h.totalResult>v.unref(l).length&&(h.currentPage++,w())})},y=async S=>{var R;g(),c.value=!0,h.currentPage=1,h.totalResult=0,l.value=[],u.value=S,await w(),c.value=!1,(R=v.unref(a))==null||R.addEventListener("scroll",_)};return v.onMounted(async()=>{var S;i.isSub||(w(),(S=v.unref(a))==null||S.addEventListener("scroll",_))}),v.onUnmounted(()=>{g()}),e({handleSearch:y}),{columnRef:a,sourceList:l,searchLoading:c,onToggleGroup:p,onToggleSource:C,setItemDisabled:s,onDragStart:m,onDragEnd:b,mapDataSetScope:D2,mapScope:I2,getLoadType:O2,getUseType:z2,getSourceType:W2}}}),wX="",gK={key:0,class:"no-data"},fK={class:"column-item"},pK=["onClick"],mK={key:3,class:"item-name"},vK={class:"column-item"},bK={key:0},CK={key:1},yK={key:2},_K={key:3},wK=["onClick"],SK={class:"item-name"},xK={class:"column-child-item"},AK={class:"field"},RK={class:"column-child-item-name"};function TK(i,t,e,n,o,r){const s=v.resolveComponent("loading-outlined"),l=v.resolveComponent("caret-down-outlined"),a=v.resolveComponent("caret-right-outlined"),h=v.resolveComponent("ind-source-list",!0),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("draggable"),c=v.resolveComponent("a-spin");return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["columns",i.isSub?"sub-columns":""]),ref:"columnRef"},[v.createVNode(c,{spinning:i.searchLoading,tip:"数据源加载中..."},{default:v.withCtx(()=>{var g;return[!((g=i.sourceList)!=null&&g.length)&&!i.searchLoading?(v.openBlock(),v.createElementBlock("div",gK,"暂无数据")):i.hasChildren?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:1},v.renderList(i.sourceList,(f,p)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:f.indexTypeGuid||f.id},[v.createElementVNode("div",fK,[v.createElementVNode("span",{class:"item-group",onClick:m=>i.onToggleGroup(p)},[f.loading?(v.openBlock(),v.createBlock(s,{key:0})):f.show?(v.openBlock(),v.createBlock(l,{key:1})):(v.openBlock(),v.createBlock(a,{key:2})),f.isLeaf?(v.openBlock(),v.createElementBlock("span",mK,v.toDisplayString(f.indexTypeCode+"."+f.indexTypeName),1)):v.createCommentVNode("",!0)],8,pK)]),f.show?(v.openBlock(),v.createBlock(h,{key:0,data:f.children,isSub:!0,hasChildren:f.isLeaf==="0",config:i.config,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd},null,8,["data","hasChildren","config","onOnDragStart","onOnDragEnd"])):v.createCommentVNode("",!0)],64))),128)):(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:2},v.renderList(i.sourceList,f=>(v.openBlock(),v.createElementBlock("div",{key:f.id,class:v.normalizeClass(i.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[v.createElementVNode("div",vK,[v.createVNode(d,null,{title:v.withCtx(()=>[v.createElementVNode("div",null,"加载类型:"+v.toDisplayString(i.getLoadType(f.loadType)),1),f.useType?(v.openBlock(),v.createElementBlock("div",bK,"数据使用系统:"+v.toDisplayString(i.getUseType(f.useType)),1)):v.createCommentVNode("",!0),f.systemSource?(v.openBlock(),v.createElementBlock("div",CK,"制度出处:"+v.toDisplayString(f.systemSource),1)):v.createCommentVNode("",!0),f.dataTo?(v.openBlock(),v.createElementBlock("div",yK,"数据来源:"+v.toDisplayString(i.getSourceType(f.dataTo)),1)):v.createCommentVNode("",!0),f.meaning?(v.openBlock(),v.createElementBlock("div",_K,"指标含义:"+v.toDisplayString(f.meaning),1)):v.createCommentVNode("",!0)]),default:v.withCtx(()=>[v.createElementVNode("span",{class:"item-group",onClick:p=>i.onToggleSource(f)},[f.show?(v.openBlock(),v.createBlock(l,{key:0})):(v.openBlock(),v.createBlock(a,{key:1})),v.createElementVNode("span",SK,v.toDisplayString((f.indexCode?f.indexCode:"")+" "+f.name),1)],8,wK)]),_:2},1024)]),f.show?(v.openBlock(),v.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:v.withCtx(({element:p})=>[v.createElementVNode("div",xK,[v.createElementVNode("span",AK,"【"+v.toDisplayString(p.scope==="FIELD"?i.mapDataSetScope(p.genericType):i.mapScope(p.scope))+"】",1),v.createElementVNode("span",RK,v.toDisplayString(p.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart","onEnd"])):v.createCommentVNode("",!0)],2))),128))]}),_:1},8,["spinning"])],2)}const MK=Ti(cK,[["render",TK],["__scopeId","data-v-aabcdc1c"]]),BK=v.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")}}}}),SX="";function PK(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"drag-area",style:v.normalizeStyle(i.style.main)},[i.maskList.includes(2)?(v.openBlock(),v.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:v.normalizeStyle(i.style.filters)},null,36)):v.createCommentVNode("",!0),i.maskList.includes(0)?v.createCommentVNode("",!0):(v.openBlock(),v.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:v.normalizeStyle(i.style.rows)},null,36)),i.maskList.includes(1)?v.createCommentVNode("",!0):(v.openBlock(),v.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:v.normalizeStyle(i.style.columns)},null,36)),i.maskList.includes(2)?v.createCommentVNode("",!0):(v.openBlock(),v.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:v.normalizeStyle(i.style.indicators)},null,36))],4)}const HK=Ti(BK,[["render",PK],["__scopeId","data-v-01e4c58d"]]),EK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r}=i;return async(l={},a,h)=>{var f;const d=AC(i,l),{url:u,...c}=d||{};let g=t;if(!g){const{pathname:p}=window==null?void 0:window.location;if(p){const m=p.split("/");m!=null&&m.length&&(g=m[m.length-1])}}if(u&&c){a&&a("tableChange",{type:"11",data:c}),h&&h(c);try{return await Dr({url:`${e}${u}`,method:"post",headers:{Authentication:n,operateContext:o},data:{...c,dataSourceId:(r==null?void 0:r.dataSourceId)||"",pageId:g},signal:((f=window.controller)==null?void 0:f.signal)||""})}catch(p){console.error(p)}}}},kK=(i={})=>{const{indicatorUrl:t=""}=i;return async(n,o)=>{var d;const r={},{search:s}=window==null?void 0:window.location;if(s){const u=s.slice(1,s.length).split("&");for(const c of u){const g=c.split("=");r[g[0]]=g[1]}}const{keyName:l,...a}=o,h={keyName:l};n==="save"&&(h.searchMap=a);try{return await Dr({url:`${t}/userSearch/${n}`,method:"post",headers:{Authentication:r.token||null},data:h,signal:((d=window.controller)==null?void 0:d.signal)||""})}catch(u){console.error(u)}}},LK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r={}}=i;return async(l={})=>{var h,d;const a=AC(i,l);try{const u=await Dr({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)||""});return((d=u==null?void 0:u.data)==null?void 0:d.data)||[]}catch(u){console.error(u)}}},FK={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},relateKeyName:{type:String,default:""},usedDimensionFields:{type:Array,default:[]},allDimensions:{type:Array,default:[]},pageConfig:{type:Object,default:()=>({})},scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})},defaultConfig:{type:Object,defalut:()=>({})}},rb={LAST_DATA:"上期值",SAME_DATA:"同期值",DIFF_DATA:"增减额",MOM_DATA:"环比(%)",YOY_DATA:"同比(%)"},rB=[{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"}],Bs=["合计","平均值","计数","最大值","最小值","方差","标准差"],IK=i=>v.defineAsyncComponent({loader:i,delay:200}),xX="",AX="",DK=v.defineComponent({name:"PivotTable",components:{PivotFilter:BT,PivotProperty:S7,ConditionalProperty:PU,ChartModal:$U,PivotAggregate:KU,PivotTop:qU,PivotConfig:uK,IndSourceList:MK,DragArea:HK,PivotDetail:tK,DrillModal:IK(()=>Promise.resolve().then(()=>qK)),SettingOutlined:w$,DatabaseOutlined:Nj,ArrowsAltOutlined:vj,ShrinkOutlined:R$,FilterOutlined:rM,DeleteOutlined:nM,ClearOutlined:kj},props:{...FK},setup(i,{expose:t,emit:e}){let n=null;const o=v.ref(!1),r=v.ref(""),s=v.ref({}),l=v.ref(),a=v.ref({}),h=v.ref({}),d=v.ref({}),u=v.ref(),c=v.ref({}),g=v.ref(),f=v.ref(),p=v.ref(),m=v.ref(),b=v.ref(),C=v.ref(),_=v.ref(),w=v.ref(),y=v.ref(),S=v.ref(),R=v.ref({}),A=v.ref(!1),x=v.ref({}),T=v.ref({}),M=v.ref({}),B=v.ref(),P=v.ref({}),F=v.ref("200px"),H=v.ref("200px"),E=v.ref(300),L=v.ref({}),I=v.ref(),k=v.ref(i.showLeftTree),D=v.ref(!1),O=v.ref({}),N=v.ref(0),z=v.ref(0),j=v.ref(),$=v.ref(!1),Y=v.ref(),K=v.ref(25),G=v.ref(!0),Q=v.ref({dateFormat:"YYYY-MM-DD"}),dt=v.ref(14),mt=40,St=6,J=10,it=15,yt=20,bt=24,lt=v.ref([]);let ct=`|${Ms(6)}|`;v.provide("splitSymbol",ct),v.provide("indicatorUrl",i.indicatorUrl),v.provide("indicatorToken",i.indicatorToken),v.provide("theme",i.theme),v.provide("pageId",i.pageId),v.provide("context",i.context),v.provide("graphicConfig",i.graphicConfig),v.provide("theDateInfo",Q),v.provide("getContainer",()=>document.querySelector("#ProviderConfig > #container")||document.body);const ht=v.ref({}),at=()=>{const V={borderColor:v.unref(pt).borderColor};ht.value=V},wt=v.computed(()=>{let V="#ECF1F5";switch(i.theme){case"default":V="#EAF0F9";break;case"dark":V="#FFFFFF";break}return{borderColor:"#E3E3E3",headerBgColor:V,headerColor:"#252525",bodyBgColor:"#FFFFFF",bodyColor:"#252525",indicatorsHeaderBgColor:V,indicatorsHeaderColor:"#252525",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#252525",aggregateBgColor:V,aggregateColor:"#252525",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"}}),ut=v.ref(1),zt=v.ref();new ResizeObserver(V=>{for(const U of V){const{width:X}=U.contentRect;zt.value=X,ut.value++,v.nextTick(()=>{gB()})}}).observe(document.body);const vt=v.computed(()=>{const{width:V}=i;return V.includes("%")&&ut.value?i.isIframeMode?zt.value:document.querySelector(`#pivotWrap_${i.id}`).clientWidth:parseFloat(V)}),pt=v.computed(()=>{var et;const V={},{styleConfig:U}=i;let X={};(et=Object.keys(U))!=null&&et.length?X=U:X=v.unref(wt);for(const q in X)V[q]=X[q]||"transparent";return V}),ie=v.ref({}),le=()=>{const V=$l();V&&(v.unref(ie).width=V.width+2+"px"),v.unref(ie).backgroundColor=RC(v.unref(pt).headerBgColor,2)};v.watch(()=>i.theme,()=>{n&&(n==null||n.updateOption(ot))});const Qt=()=>{const{widthScale:V,heightScale:U}=i.scaleValue||{};if(V&&U){const X=+(1/V).toFixed(5),et=+(1/U).toFixed(5),q=+(parseFloat(i.width)*V).toFixed(2),tt=+(parseFloat(i.height)*U).toFixed(2);K.value=25*V,R.value={transform:`scale(${X}, ${et})`,width:q+"px",height:tt+"px",left:-(q-parseFloat(i.width))/2+"px",top:-(tt-parseFloat(i.height))/2+"px",paddingLeft:v.unref(K)+"px"},dt.value=16*V,ot.defaultRowHeight=mt*U,ot.theme.scrollStyle.width=St*V,ot.theme.scrollStyle.scrollSliderCornerRadius=J*V,ot.theme.tooltipStyle.fontSize=dt.value,eK(a7,{sortNotActiveColor:v.unref(pt).sortNotActiveColor,sortActiveColor:v.unref(pt).sortActiveColor,iconSize:it*V,hoverSize:yt*V,downSize:bt*V}),v.nextTick(()=>{var Z,ft,xt,Ut,Wt,Ft,Ht,Ie,ci,Mo,Bo,wn;(ft=(Z=v.unref(S))==null?void 0:Z.style)==null||ft.setProperty("--box-tooltip-fontsize",dt.value+"px"),(Ut=(xt=v.unref(S))==null?void 0:xt.style)==null||Ut.setProperty("--box-item-size",K.value+"px"),(Ft=(Wt=v.unref(_))==null?void 0:Wt.style)==null||Ft.setProperty("--menu-item-height",32*U+"px"),(Ie=(Ht=v.unref(_))==null?void 0:Ht.style)==null||Ie.setProperty("--menu-item-padding",`0px ${12*V}px`),(Mo=(ci=v.unref(_))==null?void 0:ci.style)==null||Mo.setProperty("--menu-item-font-size",12*V+"px"),(wn=(Bo=v.unref(_))==null?void 0:Bo.style)==null||wn.setProperty("--menu-item-line-height",30*U+"px"),n&&n.updateOption(ot)})}};v.watch(()=>[i.scaleValue,i.width,i.height],()=>{Qt()},{deep:!0});const we=v.computed(()=>{var V,U,X;return i.fullMode&&!((V=ot.rows)!=null&&V.length)&&!((U=ot.columns)!=null&&U.length)&&!((X=ot.indicators)!=null&&X.length)}),Oe=v.computed(()=>{var V;return{width:(V=i.width)!=null&&V.includes("%")?"calc(100%)":parseFloat(i.width)-v.unref(E)+"px",height:"100%",backgroundColor:i.theme==="darkBlue"?"#081653":"#F1F1F1",color:i.theme==="darkBlue"?"#b2c3dd":""}}),He=v.computed(()=>{const V={fontSize:dt.value+"px"};return v.unref(k)&&(i.theme==="darkBlue"?V.color="#00CCFF":V.color="#416EFF"),V}),kt=v.ref([]),Lt=v.ref([]);v.provide("dimensionFieldList",kt),v.provide("indicatorFieldList",Lt);const Rt="-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",Bt=v.computed(()=>v.unref(kt).filter(V=>V.isInnerFilter).concat(v.unref(Lt).filter(V=>V.isInnerFilter)).sort((V,U)=>V.timeStamp-U.timeStamp));v.watchEffect(()=>{var et,q,tt,Z,ft,xt,Ut,Wt,Ft,Ht;const{dropDownMenuBgColor:V,dropDownMenuColor:U,dropDownMenuHightLightColor:X}=pt.value;V&&((q=(et=v.unref(_))==null?void 0:et.style)==null||q.setProperty("--menu-bg-color",V)),U&&((Z=(tt=v.unref(_))==null?void 0:tt.style)==null||Z.setProperty("--menu-color",U)),X&&((xt=(ft=v.unref(_))==null?void 0:ft.style)==null||xt.setProperty("--menu-hight-light-color",X)),F.value&&((Wt=(Ut=v.unref(_))==null?void 0:Ut.style)==null||Wt.setProperty("--sub-menu-left",F.value)),H.value&&((Ht=(Ft=v.unref(_))==null?void 0:Ft.style)==null||Ht.setProperty("--sub-menu-top",H.value))});const Nt=v.ref([]),ee=v.ref({}),he=v.ref({}),ot=v.reactive({records:[],columnHeaderTitle:!0,excelOptions:{fillHandle:!0},rows:[],columns:[],indicators:[],corner:{titleOnDimension:"row"},dataConfig:{sortRules:[],filterRules:[]},widthMode:"standard",heightMode:"standard",defaultRowHeight:mt,defaultColWidth:360,menu:{renderMode:"html",dropDownMenuHighlight:[]},theme:{cellInnerBorder:!1,underlayBackgroundColor:"transparent",headerStyle:{bgColor(V){return v.unref(Nt).includes(V.dataValue)?v.unref(pt).indicatorsHeaderBgColor:v.unref(pt).headerBgColor},color(V){return v.unref(Nt).includes(V.dataValue)?v.unref(pt).indicatorsHeaderColor:v.unref(pt).headerColor},borderColor:v.unref(pt).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},cornerHeaderStyle:{bgColor(){return v.unref(pt).headerBgColor},color:v.unref(pt).headerColor,borderColor:v.unref(pt).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},bodyStyle:{borderColor:v.unref(pt).borderColor,color(V){var et,q;const U=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return Bs.includes((et=U==null?void 0:U[U.length-1])==null?void 0:et.value)?v.unref(pt).aggregateColor:v.unref(Nt).includes((q=X==null?void 0:X[X.length-1])==null?void 0:q.value)?v.unref(pt).indicatorsBodyColor:v.unref(pt).bodyColor},bgColor(V){var et,q;const U=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return Bs.includes((et=U==null?void 0:U[U.length-1])==null?void 0:et.value)?v.unref(pt).aggregateBgColor:v.unref(Nt).includes((q=X==null?void 0:X[X.length-1])==null?void 0:q.value)?v.unref(pt).indicatorsBodyBgColor:v.unref(pt).bodyBgColor},fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},rowHeaderStyle:{borderColor:v.unref(pt).borderColor,bgColor(V){return Bs.includes(V.dataValue)?v.unref(pt).aggregateBgColor:v.unref(pt).bodyBgColor},color(V){return Bs.includes(V.dataValue)?v.unref(pt).aggregateColor:v.unref(pt).bodyColor},fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},frameStyle:{borderLineWidth:1,borderColor:v.unref(pt).borderColor},scrollStyle:{width:St,scrollSliderCornerRadius:J},tooltipStyle:{fontSize:v.unref(dt)}}}),Dt=v.computed(()=>{let V=0;return v.unref(k)&&i.fullMode&&(V=v.unref(E)),V}),ue=v.computed(()=>{let V=0;return v.unref(D)&&(V=20),V}),Mt=5,Kt=v.ref({});v.watch(A,V=>{if(V){const U={};v.nextTick(()=>{var q,tt;const X=$l();let et=0;(q=v.unref(Bt))!=null&&q.length&&(et=(tt=v.unref(j))==null?void 0:tt.clientHeight),X&&(U.width=X.width+"px",U.height=X.height+"px",U.top=X.top+et+v.unref(ue)+"px",U.left=X.left+v.unref(Dt)+v.unref(ue)+v.unref(K)+"px"),Kt.value=U})}});const fe=v.ref([]),$e=v.ref([]),Ps=v.ref({}),Gn=v.ref({}),jl=v.ref([]),$h=v.ref([]),Gh=v.ref([]),Uh=v.ref([]),ZK=v.computed(()=>{const V=[];for(const tt of v.unref(fe)){const{data:Z,indicatorKey:ft="",calculateType:xt=""}=tt||{};V.push({label:Z.indicatorKey,columnName:Z.indicatorKey,location:"LEFT",show:!0,calcType:"BUILT_IN",builtInFormula:xt,builtInValueSource:ft})}const U=[],X={};v.unref($e).forEach(tt=>{X[tt.key]||(X[tt.key]=[]),X[tt.key].push(tt)});for(const tt in X){const Z=X[tt]||[];Z.forEach((ft,xt)=>{var Ie;const Ut=v.unref(kt).find(ci=>ci.label===ft.key),Wt=v.unref(Lt).find(ci=>ci.label===ft.key),Ft=Ut||Wt,Ht={};xt<Z.length-1&&(Ht.join="&&"),(Ft==null?void 0:Ft.genericType)==="DATE"&&(Ht.dateFormat=((Ie=v.unref(Q))==null?void 0:Ie.dateFormat)||"YYYY-MM-DD",xt===0?Ht.prop="startTime":xt===1&&(Ht.prop="endTime")),Ft&&U.push({fieldName:Ft.name,fieldType:Ft.genericType,fieldValue:Array.isArray(ft.value)?ft.value.join(","):ft.value,hrpIndexCode:Ft.indexCode,hrpIndexCodeNum:Ft.indexCodeNum,id:Ft.id,label:Ft.label,rule:ft.rule,targetSource:"",typeGuid:ft.typeGuid||"",type:ft.type,...Ht})})}const et=[];if(Object.keys(v.unref(Ps)))for(const tt in v.unref(Ps))v.unref(Ps)[tt]&&et.push({key:tt,num:v.unref(Ps)[tt],rule:"TOP"});const q=[];if(Object.keys(v.unref(Gn)))for(const tt in v.unref(Gn)){const{order:Z,type:ft,columnData:xt,columnHeader:Ut}=v.unref(Gn)[tt];if(Z.toLowerCase()==="default-sort")continue;const Wt={label:tt,order:Z.toUpperCase(),type:"COMBINATION",fieldType:ft};ft==="indicators"&&(Wt.columnHeader=Ut,Wt.columnData=xt,Wt.type="NORMAL"),q.push(Wt)}return{calc:V,filter:U,truncations:et,sorts:q,aggregateMethod:v.unref(P)||{}}}),JK=LK(i),QK=EK(i),lb=kK(i),ab=v.ref({}),ar=async()=>{var xt,Ut,Wt,Ft;const{dimensionList:V,graphicConfig:U={}}=i,{queryColumnList:X=[]}=U,{rows:et=[],columns:q=[]}=ot,tt=(xt=v.unref(Gh))!=null&&xt.length?v.unref(Gh):[],Z=(Ut=v.unref(Uh))!=null&&Ut.length?v.unref(Uh):[];if(!(tt!=null&&tt.length))for(const Ht of et)tt.push(Ht.dimensionKey);if(!(Z!=null&&Z.length))for(const Ht of q)Z.push(Ht.dimensionKey);tt!=null&&tt.length||tt.push(...V.filter(Ht=>Ht.position==="rows").map(Ht=>Ht.key)),Z!=null&&Z.length||Z.push(...V.filter(Ht=>Ht.position==="columns").map(Ht=>Ht.key));const ft=[];for(const Ht in v.unref(a))ft.push({type:"dimension",key:Ht,rule:v.unref(a)[Ht]});for(const Ht in v.unref(h))ft.push({type:"indicators",key:Ht,rule:v.unref(h)[Ht]});if(ft!=null&&ft.length&&hf(ft,{isHandle:!1}),X!=null&&X.length)for(const Ht of X)!tt.includes(Ht.name)&&!Z.includes(Ht.name)&&tt.push(Ht.name);ab.value={...v.unref(ZK),rowDimensionKeys:tt,colDimensionKeys:Z,dimensions:(Wt=v.unref(jl))!=null&&Wt.length?v.unref(jl):v.unref(kt),indicators:(Ft=v.unref($h))!=null&&Ft.length?v.unref($h):v.unref(Lt)};try{const Ht=await QK({pivotTableCal:v.unref(ab)},e,Ie=>{var ci;if(v.unref(G)){const{sqlConditions:Mo=[],queryColumns:Bo=[]}=Ie,wn=lB(Mo),pi=Bo.find(We=>We.typeGuid==="the_date");if(pi&&(Q.value={dateFormat:pi.dateFormat||"YYYY-MM-DD"}),wn!=null&&wn.length)for(const We of wn)["startTime","endTime"].includes(We.prop)&&(v.unref(Q)[We.prop]=We.fieldValue||"",(ci=v.unref(Q))!=null&&ci.rangeFormat||(v.unref(Q).rangeFormat=We.dateFormat||"YYYY-MM-DD"));G.value=!1}});cB(Ht)}catch(Ht){console.error(Ht)}};function lB(V){const U=[];for(const X of V)X.sqlConditions?U.push(...lB(X.sqlConditions)):X.fieldName==="the_date"&&U.push(X);return U}const tY=V=>{v.unref(fe).find(U=>U.data.indicatorKey===V.data.indicatorKey)||fe.value.push(V),ar()},eY=V=>{const U=v.unref(fe).findIndex(X=>X.data.indicatorKey===V);U!==-1&&fe.value.splice(U,1),ar()},hf=(V,{isHandle:U=!0}={})=>{let X=[];Array.isArray(V)?X=V:X=[V];for(const et of X){const{key:q="",rule:tt,type:Z=""}=et||{};let ft=Xe.cloneDeep(tt);Array.isArray(tt)||(ft=[tt]);const xt=v.unref(kt).find(Ft=>Ft.label===q),Ut=v.unref(Lt).find(Ft=>Ft.label===q),Wt=xt||Ut;if(Wt){if((Wt==null?void 0:Wt.genericType)==="DATE"&&(ft==null?void 0:ft.length)===1){const Ft=ft[0].value;ft[0].rule="GREATER_EQUAL",ft[1]={rule:"LESS_EQUAL",value:Ft}}for(let Ft=v.unref($e).length-1;Ft>=0;Ft--){const Ht=v.unref($e)[Ft];Ht.key===q&&Ht.type===Z&&v.unref($e).splice(Ft,1)}for(const Ft of ft){const{rule:Ht,value:Ie}=Ft;q&&Ht&&Ie&&$e.value.push({key:q,rule:Ht,value:Ie,type:Z,typeGuid:Wt.typeGuid})}}}U&&ar()},iY=()=>{Ps.value=v.unref(x)||{},ar()},aB=V=>{const{key:U,order:X,type:et,columnData:q=[]}=V;if(et==="indicators"){let tt="";for(const Z in v.unref(Gn))v.unref(Gn)[Z].type==="indicators"&&(tt=Z);tt&&delete v.unref(Gn)[tt]}v.unref(Gn)[U]={order:X,type:et,columnData:q},ar()},Kh=()=>{const V=v.unref(kt),U=v.unref(Lt),X=V.filter(q=>q.positionType==="rows").map(q=>q.name),et=V.filter(q=>q.positionType==="columns").map(q=>q.name);jl.value=Xe.cloneDeep(V),$h.value=Xe.cloneDeep(U),Gh.value=Xe.cloneDeep(X),Uh.value=Xe.cloneDeep(et),ar()};function nY(V,U=!0,X=-1){if(X>-1)ot.indicators.splice(X,0,...V);else for(const et of V)ot.indicators.push(et);U&&n.updateOption(ot)}function oY({label:V,calcType:U}){const X=[],et=v.unref(he)[V]||[];for(const q in rb)et.indexOf(q)===-1&&X.push({text:rb[q],menuKey:q});return U==="FORMULA"||!(X!=null&&X.length)?rB:[{text:"计算",menuKey:"calculate",children:X},...rB]}function df(V){var X;let U=[];return V==="rows"?U=[{text:"钻取",menuKey:"drill"}]:U=[{text:"钻取",menuKey:"drill"},{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"筛选",menuKey:"filter"},{text:"聚合",menuKey:"aggregate"},{text:"取top",menuKey:"top"},{text:"删除",menuKey:"delete"}],i.fullMode||i.allowDrill?v.unref(lt)&&Array.isArray(v.unref(lt))&&(X=v.unref(lt))!=null&&X.length?U[0].children=v.unref(lt).map(et=>({text:et.title||et.label,menuKey:V==="rows"?`${ct}${et.label}`:et.label})):U.splice(0,1):(U.splice(0,1),U.splice(-1,1)),U}function rY(V,U){A.value=!0,v.unref(P)[U]=V||[],ar(),e("tableChange",{type:"9",data:{key:U,types:V}})}function sY(V,U=!0){var X;for(const et of V){const{key:q,name:tt,type:Z,dimensionKey:ft,width:xt}=et;let Ut;if(ft)Ut=et;else{const Wt={dimensionKey:q,title:tt,width:xt?`${xt}%`:"auto",type:Z};Z==="columns"?Wt.headerStyle={textStick:!0}:Z==="rows"&&(Wt.cornerHeaderIcon="sortNormal"),Wt.headerFormat=Ft=>{if(Z==="rows"){const Ht=Ft==null?void 0:Ft.split(ct);return Ht!=null&&Ht.length?Ht[Ht.length-1]:Ft}else return Ft},Ut=Wt}if(Ut&&(Ut.headerStyle={textStick:!0},ot[Z].push(Ut)),(X=ot[Z])!=null&&X.length)for(const Wt of ot[Z])Wt.cornerDropDownMenu=df(),Z==="rows"&&(Wt.dropDownMenu=df("rows"));ot.dataConfig.sortRules.push({sortField:q,sortType:v.unref(r)})}U&&n.updateOption(ot),v.nextTick(()=>{dB()})}function hB(V){const U={},{records:X}=ot;for(const et of X)for(const q of V)xn(U,q)?U[q].find(tt=>tt.value===et[q])||U[q].push(hb({value:et[q]})):U[q]=hb([{value:et[q]}]);return U}function hb(V){const U=Xe.cloneDeep(V);if(typeof V=="object")if(Array.isArray(U))for(const et of U)X(et);else X(U);function X(et){for(const q in et)if(typeof et[q]=="string"){const tt=et[q].split(ct);tt!=null&&tt.length&&(et[q]=tt[tt.length-1])}}return U}function dB(){const{dataset:{columns:V,rows:U}}=n,X=U.concat(V);s.value=hB(X)}const uB=v.computed(()=>{var V;return(V=v.unref(kt))!=null&&V.length?v.unref(kt).map(U=>U.label).concat(i.usedDimensionFields):i.usedDimensionFields});async function cB(V){var Ie,ci,Mo,Bo,wn,pi,We,hr;const U=await JK({pivotTableCal:v.unref(ab)});lt.value=U.filter(jt=>!v.unref(uB).includes(jt.label));let X=V;V?Y.value=Xe.cloneDeep(V):X=Xe.cloneDeep(v.unref(Y)),A.value=!0;const{data:et={}}=(X==null?void 0:X.data)||{},{rows:q=[]}=et,tt=[],Z=[];for(const jt of v.unref(kt)){if(!jt.show)continue;const se=ot[jt.positionType].find(Ze=>Ze.dimensionKey===jt.label);se?Z.push({...se,title:jt.showTitle}):Z.push({key:jt.label,name:jt.showTitle,type:jt.positionType,width:jt.width})}for(let jt=0;jt<v.unref(Lt).length;jt++){const se=v.unref(Lt)[jt];if(!se.show)continue;const Ze=oY(se),Ge=ot.indicators.find(Li=>Li.indicatorKey===se.label);let Ue={};Ge?Ue={...Ge,dropDownMenu:Ze,title:se.showTitle}:Ue={indicatorKey:se.label,title:se.showTitle,width:se!=null&&se.width?`${se.width}%`:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},dropDownMenu:Ze,format:(Li,Sn,Yh,Xh)=>{const cb=Xh.getRecordByCell(Sn,Yh)||[];return cb[0]&&isNaN(+cb[0][se.label])?cb[0][se.label]:Li||"-"}},Ue&&(Ue.style={padding:[16,28,16,28],textAlign:"right"},tt.push(Ue))}const ft=Z.filter(jt=>jt.type==="rows");if(((Ie=ot==null?void 0:ot.rows)==null?void 0:Ie.length)!==ft.length&&typeof((ci=v.unref(B))==null?void 0:ci.col)=="number"&&(v.unref(B).col+=ft.length-(((Mo=ot==null?void 0:ot.rows)==null?void 0:Mo.length)||0)),ot.indicators=[],ot.rows=[],ot.columns=[],(Bo=v.unref(fe))!=null&&Bo.length)for(const jt of v.unref(fe))isNaN(+jt.position)||tt.splice(+jt.position,0,{...jt.data,calculateType:jt.calculateType});const{sortType:xt,col:Ut,row:Wt}=v.unref(B)||{};for(const jt of tt)jt&&(jt.headerIcon=se=>{const{col:Ze,row:Ge}=se;if(Ut===Ze&&Wt===Ge){let Ue="sortNormal";return xt==="ASC"?Ue="sortUp":xt==="DESC"&&(Ue="sortDown"),Ue}else return"sortNormal"});nY(tt,!1),sY(Z,!1);const Ft=[],Ht=Z.filter(jt=>jt.type==="rows").map(jt=>jt.key||jt.dimensionKey);for(const jt of q)for(const se in jt)if(!Bs.includes(jt[se])){const Ze=Ht.indexOf(se);if(Ze!==-1){const Ge=[];for(let Ue=0;Ue<=Ze;Ue++){const Li=String(jt[Ht[Ue]]);if(Li.includes(ct)){const Sn=Li.split(ct);Sn!=null&&Sn.length&&Ge.push(Sn[Sn.length-1])}else Ge.push(Li)}Ge!=null&&Ge.length&&(jt[se]=Ge.join(ct))}}for(const jt of Z){const se=(jt==null?void 0:jt.key)||(jt==null?void 0:jt.dimensionKey);if(jt.type==="columns"&&!v.unref(M)[se])v.unref(M)[se]=db("",se,q);else if(jt.type==="rows")if(v.unref(T)[se]){const{type:Ze}=v.unref(T)[se]||{};Ft.push(db(Ze,se,q))}else if(!v.unref(B)||v.unref(B).sortField===se||!n)Ft.push(db("",se,q));else{const Ze=ot.dataConfig.sortRules.find(Ge=>Ge.sortField===se);Ze&&Ft.push(Ze)}}if(v.unref(B)&&Ft.push(v.unref(B)),(wn=Object.keys(v.unref(M)))!=null&&wn.length)for(const jt in v.unref(M))Ft.push(v.unref(M)[jt]);if(ot.records=q,ot.dataConfig.sortRules=Ft,q!=null&&q.length&&(v.unref(O).records=[]),(pi=ot.columns)!=null&&pi.length?ot.columnHeaderTitle=!0:(We=ot.indicators)!=null&&We.length?ot.columnHeaderTitle=!1:(hr=ot.rows)!=null&&hr.length&&(ot.columnHeaderTitle=!0),n)n.updateOption(ot),v.nextTick(()=>{fB()}),A.value=!1;else{const jt=document.getElementById(`pivotTableContainer_${i.id}`);n=new AT(jt,ot),v.nextTick(()=>{fB(),o.value=!0,A.value=!1,i.isIframeMode&&(v.unref(N)&&n.setScrollTop(v.unref(N)),v.unref(z)&&n.setScrollLeft(v.unref(z)))}),vY()}v.nextTick(()=>{const{indexFormatConfig:jt}=(i==null?void 0:i.defaultConfig)||{};if(jt){const se=[];for(const Ze in jt)jt[Ze]&&se.push(jt[Ze]);CB(se)}})}const Hs=v.ref({});function gB(){$l()&&(v.unref(D)?(v.unref(Hs).top=v.unref(ue)+"px",v.unref(Hs).left="0"):(v.unref(Hs).top="0",v.unref(Hs).left="0"))}function fB(){var V;if(n&&!((V=ot.records)!=null&&V.length)){const{dataset:{rows:U}}=n,X={};for(const et of U)X[et]="";v.unref(O).dataConfig={...ot.dataConfig,filterRules:[]},v.unref(O).records=[X],n.updateOption({...ot,...v.unref(O)})}}function lY(V,U){A.value=!0,hf({type:"indicators",key:V,rule:U}),e("tableChange",{type:"3",data:{type:"indicators",key:V,rule:U}})}function aY(V,U){A.value=!0,hf({type:"dimension",key:V,rule:U}),e("tableChange",{type:"3",data:{type:"dimension",key:V,rule:U}})}function hY(V,U){var tt;let X=!1;const et=ot[U].findIndex(Z=>Z.dimensionKey===V),q=ot.dataConfig.sortRules.findIndex(Z=>Z.sortField===V);if(et!==-1){if(ot[U].splice(et,1),i.fullMode||i.allowDrill){const Z=v.unref(kt).findIndex(ft=>ft.label===V);Z!==-1&&(v.unref(kt)[Z].isInnerFilter?(v.unref(kt)[Z].show=!1,X=!0):v.unref(kt).splice(Z,1))}else for(const Z of ot[U])Z.cornerDropDownMenu=df(),U==="rows"&&(Z.dropDownMenu=df("rows"));(tt=v.unref(B))!=null&&tt.col&&(v.unref(B).col-=1),A.value=!0,Kh(),e("tableChange",{type:"7"})}q!==-1&&(ot.dataConfig.sortRules[q].sortType=r),n.updateOption(ot),v.nextTick(()=>{if(dB(),!X){delete a.value[V];const Z=v.unref($e).findIndex(ft=>ft.key===V);Z!==-1&&v.unref($e).splice(Z,1)}})}function dY(V){const{indicators:U}=ot,X=U.findIndex(et=>et.indicatorKey===V);if(X!==-1){const et=U[X];if(U.splice(X,1),et.calculateType){const q=et.indicatorKey.split("@"+et.calculateType)[0],tt=v.unref(he)[q].indexOf(et.calculateType);tt!==-1&&v.unref(he)[q].splice(tt,1);const Z=v.unref(Nt).indexOf(et.title);Z!==-1&&v.unref(Nt).splice(Z,1),delete v.unref(ee)[et.title]}eY(et.indicatorKey),e("tableChange",{type:"2",data:et.indicatorKey})}}function db(V,U,X){let et=[];const q=new Set;for(const tt of X){const Z=tt[U];Z&&!Bs.includes(Z)&&q.add(Z)}return et=Array.from(q),V==="asc"?et=et.sort((tt,Z)=>tt.localeCompare(Z)):V==="desc"&&(et=et.sort((tt,Z)=>Z.localeCompare(tt))),{sortField:U,sortBy:[...et,...Bs]}}function pB(V,U,X,et){A.value=!0;let{menu:{dropDownMenuHighlight:q},rows:tt}=ot;et=et+1,q=q.filter(ft=>!(ft.type==="dimension"&&ft.field===U)||ft.type==="indicator"),q.push({col:X,row:et-1,field:U,type:"dimension",menuKey:V}),ot.menu.dropDownMenuHighlight=q;const Z=tt.find(ft=>ft.dimensionKey===U);if(Z){let ft="sortNormal";V==="asc"?ft="sortUp":V==="desc"&&(ft="sortDown"),Z.cornerHeaderIcon=ft}n.updateOption(ot),V==="default-sort"?delete v.unref(T)[U]:v.unref(T)[U]={type:V},aB({key:U,order:V,type:"dimension"}),e("tableChange",{type:"4",data:{key:U,order:V,type:"dimension"}})}function mB(V,U,X,et,q){var Ht;A.value=!0;const{menu:tt}=ot;let Z=tt.dropDownMenuHighlight,ft="";(Ht=ot.rows)!=null&&Ht.length&&(ft=ot.rows[ot.rows.length-1].dimensionKey);const xt=X.filter((Ie,ci)=>ci<X.length-1),Ut=xt.map(Ie=>({columnName:Ie.dimensionKey})),Wt=xt.map(Ie=>Ie.value),Ft=Z.findIndex(Ie=>Ie.field===ft&&Ie.type==="dimension");Ft!==-1&&Z.splice(Ft,1),Z=Z.filter(Ie=>Ie.type==="dimension"),Z.push({col:et,row:q,field:U,type:"indicator",menuKey:V}),ot.menu.dropDownMenuHighlight=Z,n.updateOption(ot),V==="default-sort"?B.value=null:B.value={sortField:ft,sortByIndicator:U,sortType:V.toUpperCase(),query:Wt,col:et,row:q},aB({key:U,order:V,type:"indicators",columnData:Wt,columnHeader:Ut}),e("tableChange",{type:"4",data:{key:U,order:V,type:"indicators"}})}function vB({dimensionKey:V,value:U=""}){const X={};v.unref(a)[V]&&(X.filterData=v.unref(a)[V]);const et=v.unref(kt).find(q=>q.label===V);d.value={tableInstance:n,fieldName:U||(et==null?void 0:et.title)||V,key:V,type:"dimension",...X},v.nextTick(()=>{v.unref(u).showModal(),e("tableChange",{type:"5",data:V})})}function uY(V,U){d.value={tableInstance:n,fieldName:U,key:V,type:"indicators",filterData:v.unref(h)[V]},v.nextTick(()=>{v.unref(u).showModal()})}function cY({indicatorKey:V,menuKey:U}){A.value=!0;let X=ot.indicators.length-1;const et=`${V}@${U}`,q=`${V}(${rb[U]}) fx`;v.unref(Nt).push(q),v.unref(ee)[q]=et,ot.indicators.forEach((tt,Z)=>{tt.indicatorKey===V&&(X=Z+1)}),v.unref(he)[V]||(v.unref(he)[V]=[]),v.unref(he)[V].push(U),tY({data:{indicatorKey:et,title:q,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],textAlign:"right"},format:(tt,Z,ft,xt)=>{const Ut=xt.getRecordByCell(Z,ft)||[];return Ut[0]&&isNaN(+Ut[0][et])?Ut[0][et]:tt}},position:X,indicatorKey:V,calculateType:U}),e("tableChange",{type:"1",data:{indicatorKey:V,calculateType:U}})}function gY(){const V=ot.rows[0]?ot.rows[0].cornerDropDownMenu:[],U=ot.columns[0]?ot.columns[0].cornerDropDownMenu:[],X=ot.rows.map(Z=>({...Z,cornerDropDownMenu:U})),et=ot.columns.map(Z=>({...Z,cornerDropDownMenu:V}));ot.columns=X,ot.rows=et;const{type:q,len:tt}=ot.aggregate||{};q&&(ot.records.splice(-tt),ot.aggregate={type:q,len:0}),ot.menu.dropDownMenuHighlight=[],a.value={},h.value={},c.value={},ot.dataConfig.filterRules=[],n.updateOption(ot)}function fY({indicatorKey:V,fieldName:U}){const X=uf(V);if(X>-1){const et=ot.indicators[X].formatConfig||{};v.unref(g).showModal({...et,indicatorKey:V,fieldName:U})}}function pY(V){const U=uf(V);if(U>-1){const X=ot.indicators[U].conditionalConfig||[];v.unref(f).showModal(V,X)}}function uf(V){return ot.indicators.findIndex(U=>U.indicatorKey===V)}function mY(V){const U=v.unref(kt)[0],X=v.unref(kt).map(tt=>tt.label),et=hB(X),q={xLabel:U.label,yLabel:V,dimensionData:et,records:hb(ot.records)};v.unref(C).showModal(q)}function vY(){n.on("scroll",V=>{const{scrollDirection:U}=V;U==="vertical"?N.value=n.getScrollTop():U==="horizontal"&&(z.value=n.getScrollLeft())}),n.on("dblclick_cell",V=>{const{cellLocation:U="",field:X=""}=V;U==="body"&&!X.includes("LAST_DATA")&&!X.includes("SAME_DATA")&&!X.includes("DIFF_DATA")&&!X.includes("MOM_DATA")&&!X.includes("YOY_DATA")&&v.unref(w).showModal({args:V,splitSymbol:ct,dimension:v.unref(kt),indicator:v.unref(Lt)})}),n.on("after_render",()=>{at(),gB(),le(),v.nextTick(()=>{o.value=!0})}),n.on("icon_click",V=>{const{name:U,col:X,row:et}=V;if(["sortNormal","sortUp","sortDown"].includes(U)){const{rows:q,indicators:tt}=ot,Z=n.getCellValue(X,et);let ft=v.unref(kt).find(Ht=>Ht.showTitle===Z);ft||(ft=v.unref(Lt).find(Ht=>Ht.showTitle===Z));let xt=ft==null?void 0:ft.label;if(v.unref(Nt).includes(Z)&&(xt=v.unref(ee)[Z]),!xt)return;const Ut=q.find(Ht=>Ht.dimensionKey===xt),Wt=tt.find(Ht=>Ht.indicatorKey===xt);let Ft="default-sort";if(U==="sortUp"?Ft="desc":U==="sortDown"?Ft="default-sort":(!U||U==="sortNormal")&&(Ft="asc"),Wt){const Ht=n.getCellHeaderPaths(X,et);mB(Ft,xt,(Ht==null?void 0:Ht.colHeaderPaths)||[],X,et)}else Ut&&pB(Ft,xt,X,et)}}),n.on("show_menu",()=>{const V=document.querySelector(`#pivotTableContainer_${i.id} .vtable__menu-element`);if(V){V.classList.add("first");let U=parseFloat(V.style.left)+V.clientWidth+3;F.value=U+"px",H.value=parseFloat(V.style.top)+"px"}}),n.on("dropdown_menu_click",V=>{const{field:U,col:X,row:et}=V,{dimensionKey:q,indicatorKey:tt,value:Z}=U[U.length-1];let ft=V.menuKey,xt=!1;ft.includes(ct)&&(xt=!0,ft=ft.replace(ct,"")),l.value=V;const Ut=v.unref(lt).find(Wt=>Wt.label===ft);if(Ut){const Wt=v.unref(kt).findIndex(Ft=>Ft.label===q);if(Wt!==-1){const Ft={...Ut,show:!0,positionType:"rows",showTitle:Ut.title||Ut.label};xt?v.unref(y).showModal({drillDimension:Ft,drillFieldData:U,usedDimensionFields:v.unref(uB),tableProps:i}):(kt.value.splice(Wt+1,0,Ft),A.value=!0,Kh()),e("tableChange",{type:"8"})}}switch(ft){case"drill":alert("无维度可钻取");break;case"delete":q?hY(q,"rows"):tt&&dY(tt);break;case"asc":case"desc":case"default-sort":q?pB(ft,q,X,et):tt&&mB(ft,tt,U,X,et);break;case"filter":q?vB({dimensionKey:q}):tt&&uY(tt,Z);break;case"LAST_DATA":case"SAME_DATA":case"DIFF_DATA":case"MOM_DATA":case"YOY_DATA":case"zb":cY({indicatorKey:tt,menuKey:ft});break;case"trans":gY();break;case"property":fY({indicatorKey:tt,fieldName:Z});break;case"conditionalProperty":pY(tt);break;case"aggregate":v.unref(p).showModal(v.unref(P)[q]||[],q);break;case"top":bY(q);break;case"graph":mY(tt);break}})}function bY(V){v.unref(m).showModal({value:v.unref(x)[V]||"",key:V})}function CY(){v.unref(b).showModal(v.unref(kt),v.unref(Lt))}async function yY(){A.value=!0,await lb("save",{keyName:i.relateKeyName||i.keyName,data:[]}),a.value={},h.value={},c.value={},ot.dataConfig.filterRules=[],$e.value=[],ar()}function _Y(V=[],U=[]){var tt;const X=V.concat(U).map(Z=>Z.name),et=v.unref(kt).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1})),q=v.unref(Lt).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1}));kt.value=[...V,...et],Lt.value=[...U,...q];for(const Z in v.unref(Gn))if(((tt=v.unref(Gn)[Z])==null?void 0:tt.type)==="indicators"){delete v.unref(Gn)[Z];break}i.fullMode||i.allowDrill?(T.value={},B.value={},M.value={},A.value=!0,Kh(),e("tableChange",{type:"10",data:{dimensions:v.unref(kt),indicators:v.unref(Lt)}})):cB()}function wY(V){if(!v.unref(I))return;const{name:U,scope:X}=v.unref(I),et=v.unref(kt).find(xt=>xt.name===U),q=v.unref(kt).findIndex(xt=>xt.name===U),tt=v.unref(Lt).find(xt=>xt.name===U),Z=v.unref(Lt).findIndex(xt=>xt.name===U),ft={timeStamp:new Date().getTime()};if(["rows","columns"].includes(V))if(et)if(et.show){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else et.positionType=V,et.show=!0,v.unref(kt).push(et),v.unref(kt).splice(q,1);else v.unref(kt).push({...Xe.cloneDeep(v.unref(I)),...ft,positionType:V,showTitle:v.unref(I).label});else if(V==="indicators")if(tt)if(tt.show){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else tt.show=!0,v.unref(Lt).push(tt),v.unref(Lt).splice(Z,1);else v.unref(Lt).push({...Xe.cloneDeep(v.unref(I)),...ft,showTitle:v.unref(I).label});else if(V==="filters"){if(["IDX","BUILT_IN_IDX"].includes(X))if(v.unref(Bt).find(xt=>xt.name===U)){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else tt?(tt.isInnerFilter=!0,tt.timeStamp=new Date().getTime()):v.unref(Lt).push({...Xe.cloneDeep(v.unref(I)),showTitle:v.unref(I).label,show:!1,isInnerFilter:!0,...ft});else if(["DIM","BUILT_IN_DIM"].includes(X))if(v.unref(Bt).find(xt=>xt.name===U)){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else et?(et.isInnerFilter=!0,et.timeStamp=new Date().getTime()):v.unref(kt).push({...Xe.cloneDeep(v.unref(I)),positionType:"filters",showTitle:v.unref(I).label,show:!1,isInnerFilter:!0,...ft})}A.value=!0,I.value=null,Kh(),e("tableChange",{type:"10",data:{dimensions:v.unref(kt),indicators:v.unref(Lt)}})}const SY=(V=[])=>{let U=!1;for(const X of v.unref(kt))if(!V.find(q=>q.typeGuid===X.typeGuid)){U=!0;break}return U};v.provide("setItemDisabled",SY);const bB=()=>{},xY=({checkKeys:V,key:U,type:X})=>{X==="dimension"?(a.value[U]=V,c.value={},aY(U,V)):X==="indicators"&&(h.value[U]=V,lY(U,V));const et=[];for(const q in v.unref(a))et.push({key:q,data:v.unref(a)[q],type:"dimension"});for(const q in v.unref(h))et.push({key:q,data:v.unref(h)[q],type:"indicators"});lb("save",{keyName:i.relateKeyName||i.keyName,data:et})};function CB(V){let U=V;Array.isArray(U)||(U=[V]);for(const X of U){const{indicatorKey:et,unit:q="",format:tt,floatLength:Z,position:ft}=X,xt=uf(et);if(xt>-1){const Ut=ot.indicators[xt];Ut.formatConfig=X,Ut.format=(Wt,Ft,Ht,Ie)=>{const ci=Ie.getRecordByCell(Ft,Ht)||[];return ci[0]&&isNaN(+ci[0][Ut.indicatorKey])?ci[0][Ut.indicatorKey]:(tt==="integer"?Wt=Math.round(Number(Wt)):tt==="float"&&!isNaN(Z)?Wt=Number(Wt).toFixed(Z):tt==="percent"&&(Z?Wt=(Number(Wt)*100).toFixed(Z)+"%":Wt=Number(Wt)*100+"%"),ft==="right"?Wt+q:q+Wt)}}}n.updateOption(ot)}function AY(V,U=[]){const X=uf(V);if(X>-1){const et=ot.indicators[X];et.conditionalConfig=U;const q=[];U.forEach(tt=>{let Z="";tt.conditions.forEach((ft,xt)=>{xt>0&&(Z+=ft.join==="and"?" && ":" || "),Z+=`value${ft.operation}${ft.value}`}),q.push(Z)}),et.style.color=({dataValue:tt})=>{let Z="#333";return U.forEach((ft,xt)=>{ft.color&&(Z=ub(q[xt],tt)?ft.color:Z)}),Z},et.style.textAlign=({dataValue:tt})=>{let Z="left";return U.forEach((ft,xt)=>{ft.align&&(Z=ub(q[xt],tt)?ft.align:Z)}),Z},et.customRender=({rect:tt,dataValue:Z})=>{let ft=[];return U.forEach((xt,Ut)=>{if(xt.icon&&ub(q[Ut],Z)){const Ft=F2(xt.icon,xt.iconColor);ft=[{type:"icon",x:xt.align!=="right"?15:tt.width-25,y:tt.height/2-7,svg:Ft,height:14,width:14}]}}),{elements:ft,renderDefault:!0}},n.updateOption(ot)}}function ub(V,U){V=V||"true";const X=`function (value){
|
|
367
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function iU(i){var t=function(e,n){if(Wl(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n||"default");if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return Wl(t)=="symbol"?t:t+""}function ib(i,t,e){return(t=iU(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Xg=v.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=v.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),background:"hsl(".concat(i.hue,", 100%, 50%)")}});return{saturationStyle:n,sliderStyle:v.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 Ro(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))}}Ro(".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}"),Xg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"saturation",style:v.normalizeStyle(i.saturationStyle),onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[t[1]||(t[1]=v.createElementVNode("div",{class:"saturation-white"},null,-1)),t[2]||(t[2]=v.createElementVNode("div",{class:"saturation-black"},null,-1)),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],36)},Xg.__scopeId="data-v-24517fec",Xg.__file="src/picker/Saturation.vue";var qg=v.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=v.computed(function(){return{top:"".concat((1-i.hue/360)*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.ref();return v.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)}}}}),nU={ref:"canvas"};Ro(".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}"),qg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"hue",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",nU,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},qg.__scopeId="data-v-78b9f4f0",qg.__file="src/picker/Hue.vue";var Zg=v.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=v.computed(function(){return{top:"".concat(i.alpha*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.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 v.watch(function(){return i.color},function(){r()}),v.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)}}}}),oU={ref:"canvas"};Ro(".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}"),Zg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"alpha",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",oU,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},Zg.__scopeId="data-v-24dc9656",Zg.__file="src/picker/Alpha.vue";var jM={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},$M={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},rU={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function GM(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 nb(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?GM(Object(e),!0).forEach(function(n){ib(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):GM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}var Ts=null,UM=function(i,t,e){var n=v.ref({}),o=e||{},r=o.placement,s=o.defaultStyle,l={strategy:o.strategy||"absolute",placement:r||"auto",onFirstUpdate:function(){Ts.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=nb(nb(nb({},c),s),{},{transformOrigin:u==="top"?"center bottom":"center top"})}}]};return v.watch(function(){return[v.unref(i),v.unref(t)]},function(a,h){var d,u=Nl(a,2),c=u[0],g=u[1],f=Nl(h,2),p=f[0],m=f[1];if(c&&g&&(p!==c||m!==p)){(d=Ts)===null||d===void 0||d.destroy();var b=c.$el||c,C=g.$el||g;v.nextTick(function(){Ts=tU(b,C,l)})}}),v.onBeforeUnmount(function(){var a;Ts&&((a=Ts)===null||a===void 0||a.destroy(),Ts=null)}),{instance:Ts,style:n}},Jg=v.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=v.ref(null),o=v.ref(null),r=v.ref(!1),s=UM(n,o,{strategy:"fixed",defaultStyle:{zIndex:2}}).style,l=v.computed(function(){return Array.isArray(i.options)&&i.options.length>1}),a=v.computed(function(){var d=i.options,u=i.showAlpha,c=i.value;return Array.isArray(d)?u?d.map(function(g){return jM[g]}).filter(function(g){return!g.includes(c)}):d.map(function(g){return $M[g]}).filter(function(g){return!g.includes(c)}):[]}),h=function(d){var u,c,g=d.target;!((u=v.unref(n))!==null&&u!==void 0&&u.isEqualNode(g))&&(!((c=v.unref(n))===null||c===void 0)&&c.contains(g))||(r.value=!1)};return v.onMounted(function(){document.addEventListener("mouseup",h,!1)}),v.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",rU[d])}}}}),sU={class:"format"},lU={key:0,class:"arrow"},aU=["onClick"];Ro(".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 v.openBlock(),v.createElementBlock("div",sU,[v.createElementVNode("div",{class:"label",ref:"targetRef",onClick:t[0]||(t[0]=function(){return i.onShow&&i.onShow.apply(i,arguments)})},[v.createElementVNode("span",null,v.toDisplayString(i.value),1),i.isNeedSelect?(v.openBlock(),v.createElementBlock("div",lU)):v.createCommentVNode("v-if",!0)],512),v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowSelector?(v.openBlock(),v.createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:v.normalizeStyle(i.selectorStyle)},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.formatOptions,function(s){return v.openBlock(),v.createElementBlock("div",{class:"selector-item",key:s,onClick:function(l){return i.onFormatChange(s)}},v.toDisplayString(s),9,aU)}),128))],4)):v.createCommentVNode("v-if",!0)]}),_:1})])},Jg.__scopeId="data-v-5f6e8f5e",Jg.__file="src/picker/input-value/FormatValue.vue";var Qg=v.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:v.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)}}}}),hU={class:"input"},dU=[".value"];function KM(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 $n(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?KM(Object(e),!0).forEach(function(n){ib(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):KM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}Ro(".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}"),Qg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("FormatValue");return v.openBlock(),v.createElementBlock("div",hU,[v.createVNode(s,{value:i.format,showAlpha:i.showAlpha,options:i.formatOptions,onChange:i.onFormatChange},null,8,["value","showAlpha","options","onChange"]),v.createElementVNode("input",{class:"value",style:v.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]=v.withKeys(function(){return i.onEnter&&i.onEnter.apply(i,arguments)},["enter"]))},null,44,dU)])},Qg.__scopeId="data-v-2c454c00",Qg.__file="src/picker/input-value/InputValue.vue";var YM=function(i,t,e){return[i,t*e/((i=(2-t)*e)<1?i:2-i)||0,i/2]},XM={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},tf=function(i){i=Math.min(Math.round(i),255);var t=Math.floor(i/16),e=i%16;return"".concat(XM[t]||t).concat(XM[e]||e)},qM=function(i){var t=i.r,e=i.g,n=i.b;return isNaN(t)||isNaN(e)||isNaN(n)?"":"#".concat(tf(t)).concat(tf(e)).concat(tf(n))},Vl=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)},Vh=function(i,t,e){i=6*Vl(i,360),t=Vl(t,100),e=Vl(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)}},ZM=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=YM(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=Vh(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(qM(Vh(r,s,l))).concat(tf(255*a))}else switch(t){case"hsl":var f=YM(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=Vh(r,s,l),m=p.r,b=p.g,C=p.b;return"rgb(".concat(m,", ").concat(b,", ").concat(C,")");default:return qM(Vh(r,s,l))}},ef=function(i){var t=i.r,e=i.g,n=i.b;t=Vl(t,255),e=Vl(e,255),n=Vl(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}},JM=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)}},QM=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]}},ob=function(i,t,e){if(typeof i=="string"&&i!==""){var n=nf(i,of(i),e),o=nB(n);return o==null?"":ZM(o,t,e)}return""},tB=function(i){var t=Nl(i.match(/(\d(\.\d+)?)+/g),4);return{r:t[0],g:t[1],b:t[2],a:t[3]}},eB=function(i){var t=Nl(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}},iB=function(i){var t=Nl(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)}},nf=function(i,t){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(t){case"rgb":var e=tB(i),n=e.r,o=e.g,r=e.b,s=e.a;return $n($n({},ef({r:n,g:o,b:r})),{},{a:+s});case"hsv":var l=iB(i);return{h:l.h,s:l.s,v:l.v,a:l.a};case"hsl":var a=eB(i),h=a.h,d=a.s,u=a.l,c=a.a;return $n($n({},JM({h,s:d,l:u})),{},{a:+c});default:var g=QM(i),f=g.r,p=g.g,m=g.b,b=g.a;return $n($n({},ef({r:f,g:p,b:m})),{},{a:b/255})}else switch(t){case"rgb":return $n($n({},ef(tB(i))),{},{a:1});case"hsv":var C=iB(i);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return $n($n({},JM(eB(i))),{},{a:1});default:return $n($n({},ef(QM(i))),{},{a:1})}},of=function(i){return i.match(/^#/)?"hex":i.match(/^rgb/)?"rgb":i.match(/^hsl/)?"hsl":i.match(/^hsv/)?"hsv":"hex"},nB=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})},jh=v.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=v.ref(),e=v.inject("theme",{theme:"light"}).theme,n=v.computed(function(){return parseFloat((i.width||i.size)+"")}),o=v.computed(function(){return parseFloat((i.height||i.size)+"")}),r=v.computed(function(){return{width:"".concat(v.unref(n),"px"),height:"".concat(v.unref(o),"px"),border:i.border?"1px solid ".concat(v.unref(e)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(i.borderRadius,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(v.unref(e)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var l=t.value.getContext("2d");t.value.width=v.unref(n),t.value.height=v.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,v.unref(n),v.unref(o)),l.fillStyle=i.value,l.fillRect(0,0,v.unref(n),v.unref(o))};return v.watch(function(){return i.value},function(){s()}),v.onMounted(function(){s()}),{canvas:t,colorItemStyle:r}}}),uU=["draggable"];Ro(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),jh.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("canvas",{class:"color-item",style:v.normalizeStyle(i.colorItemStyle),ref:"canvas",draggable:i.draggable},null,12,uU)},jh.__scopeId="data-v-02da71fd",jh.__file="src/color-item/ColorItem.vue";var rf=v.defineComponent({name:"Colors",components:{ColorItem:jh},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:v.computed(function(){return i.colors.map(function(n){return ob(n,"hex",!0)})})}}}),cU={class:"colors"};function oB(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 To(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?oB(Object(e),!0).forEach(function(n){ib(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):oB(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}Ro(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),rf.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item");return v.openBlock(),v.createElementBlock("div",cU,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.useColors,function(l,a){return v.openBlock(),v.createBlock(s,{key:a,class:"color-item",size:16,value:l,border:!1,"border-radius":3,selected:i.selectedIndex===a,onClick:v.withModifiers(function(h){return i.onSelectColor(l,+a)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},rf.__scopeId="data-v-0f8b52a8",rf.__file="src/picker/Colors.vue";var sf=v.defineComponent({name:"Picker",components:{Colors:rf,Saturation:Xg,Hue:qg,Alpha:Zg,InputValue:Qg},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=v.computed(function(){return To(To({},i.style),{},{width:i.showAlpha?"230px":"205px"})}),o=v.ref(),r=v.ref(),s=v.ref(),l=function(){var p,m=(p=i.value)===null||p===void 0?void 0:p.trim();if(m!=null&&m!==""){var b=of(m);return nB(nf(m,b,i.showAlpha))}return null};v.watch(function(){return i.value},function(){i.value!==v.unref(s)&&(o.value=l())},{immediate:!0}),v.watch(function(){return[v.unref(o),i.format]},function(p){var m=Nl(p,2),b=m[0],C=m[1],_="";b!=null?(_=ZM(To({},b),i.format,i.showAlpha),r.value=To({},b)):r.value=null,s.value=_;var w=l();JSON.stringify(b)!==JSON.stringify(w)&&JSON.stringify(b)!==JSON.stringify(C)&&e("change",_)},{immediate:!0});var a=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.h)||0}),h=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.s)||0}),d=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.v)||0}),u=v.computed(function(){var p,m;return((p=v.unref(o))===null||p===void 0?void 0:p.a)!=null?(m=v.unref(o))===null||m===void 0?void 0:m.a:1}),c=v.computed(function(){return Vh(v.unref(a),v.unref(h),v.unref(d))}),g=v.computed(function(){return"rgb(".concat(v.unref(c).r,", ").concat(v.unref(c).g,", ").concat(v.unref(c).b,")")}),f=v.ref(-1);return{h:a,s:h,v:d,a:u,rgbStr:g,onSelectSaturation:function(p,m){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:p,v:m,a:v.unref(u)}:o.value=To(To({},v.unref(o)),{},{s:p,v:m})},onSelectHue:function(p){f.value=-1,v.unref(o)==null&&(o.value={h:p,s:v.unref(h),v:v.unref(d),a:v.unref(u)}),o.value=To(To({},v.unref(o)),{},{h:p})},onSelectAlpha:function(p){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:v.unref(h),v:v.unref(d),a:p}:o.value=To(To({},v.unref(o)),{},{a:p})},handleInputFormat:function(p){return i.showAlpha?jM[p]:$M[p]},colorValue:s,pickerStyle:n,onInputChange:function(p){f.value=-1,s.value=p},handleChange:function(){var p,m=(p=v.unref(s))===null||p===void 0?void 0:p.trim();if(m!==""){var b=i.showAlpha,C=of(m),_=nf(m,C,b),w=function(y){var S=y.h,R=y.s,A=y.v,x=y.a;return!(isNaN(S)||isNaN(R)||isNaN(A)||isNaN(x))}(_);w?o.value=_:v.unref(r)!=null?o.value=v.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 b=of(p);b?function(C,_,w){if(C.length!==0){var y=nf(C,_,w),S=y.h,R=y.s,A=y.v;if(!(isNaN(S)||isNaN(R)||isNaN(A))){var x=1,T=y.a;isNaN(T)||(x=T),o.value={h:S,s:R,v:A,a:x}}}}(p,b,!0):o.value=null}},onFormatChange:function(p){e("formatChange",p)}}}}),gU={class:"picker-inner"},fU={class:"picker-header"};Ro(".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}"),sf.render=function(i,t,e,n,o,r){var s=v.resolveComponent("saturation"),l=v.resolveComponent("hue"),a=v.resolveComponent("alpha"),h=v.resolveComponent("input-value"),d=v.resolveComponent("Colors");return v.openBlock(),v.createElementBlock("div",{class:"picker",style:v.normalizeStyle(i.pickerStyle)},[v.createElementVNode("div",gU,[v.createElementVNode("div",fU,[v.createVNode(s,{class:"saturation",hue:i.h,saturation:i.s,value:i.v,onChange:i.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),v.createVNode(l,{class:"hue",hue:i.h,onChange:i.onSelectHue},null,8,["hue","onChange"]),i.showAlpha?(v.openBlock(),v.createBlock(a,{key:0,class:"alpha",alpha:i.a,color:i.rgbStr,onChange:i.onSelectAlpha},null,8,["alpha","color","onChange"])):v.createCommentVNode("v-if",!0)]),v.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?(v.openBlock(),v.createBlock(d,{key:0,class:"colors",colors:i.colors,"selected-index":i.selectColorIndex,onChange:i.onSelectColor},null,8,["colors","selected-index","onChange"])):v.createCommentVNode("v-if",!0)])],4)},sf.__scopeId="data-v-6ceadec6",sf.__file="src/picker/Picker.vue";var lf=v.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(i){var t=v.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:v.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(v.unref(t)==="dark"?"#2681ff":"#1890ff"):""}})}}});Ro(".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}"),lf.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("svg",{class:"add-color-item",style:v.normalizeStyle(i.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[v.createElementVNode("g",{class:"container"},[v.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},lf.__scopeId="data-v-ceb1719c",lf.__file="src/add-color-item/AddColorItem.vue";var af=v.defineComponent({name:"ColorPicker",components:{ColorItem:jh,Picker:sf,AddColorItem:lf},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=v.ref([]),o=v.computed(function(){return v.unref(n).map(function(x){return ob(x,"hex",i.showAlpha)})}),r=v.ref("hex");v.watch(function(){return i.format},function(){r.value=i.format},{immediate:!0}),v.watch(function(){return i.value},function(){var x=i.value||"",T=Array.isArray(x)?x:[x];n.value=T.map(function(M){return ob(M,v.unref(r),i.showAlpha)})},{immediate:!0});var s=v.ref(void 0),l=v.computed(function(){return v.unref(n)[v.unref(s)]}),a=v.ref(!1);v.watch(function(){return i.showPicker},function(){a.value=i.showPicker},{immediate:!0});var h,d,u=v.ref(null),c=v.ref(null),g=UM(u,c,{defaultStyle:{zIndex:i.zIndex},strategy:i.position,placement:i.placement}).style,f=function(){v.unref(u)==null&&(u.value=v.unref(A)[0]),v.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",v.toRaw(Array.isArray(i.value)||i.addColor?v.unref(n):v.unref(n)[0]))},m=v.ref(),b=function(){var x=WM(Yg.mark(function T(M){var B,P,F,H;return Yg.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(P=M.target,(F=(B=P.dataset)===null||B===void 0?void 0:B.index)!=null&&F!==""){E.next=4;break}return E.abrupt("return");case 4:if(H=+F,v.unref(s)!==H){E.next=7;break}return E.abrupt("return");case 7:v.unref(s)!=null&&v.unref(s)!==H?(p(),h&&clearTimeout(h),h=setTimeout(function(){f(),clearTimeout(h)},100)):f(),s.value=H,u.value=P;case 10:case"end":return E.stop()}},T)}));return function(T){return x.apply(this,arguments)}}(),C=function(){var x=WM(Yg.mark(function T(M){var B,P,F,H,E;return Yg.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(H=M.target,!(!((B=v.unref(m))!==null&&B!==void 0&&B.isEqualNode(H))&&(!((P=v.unref(m))===null||P===void 0)&&P.contains(H)))){L.next=4;break}return L.abrupt("return");case 4:if(E=(F=v.unref(c))===null||F===void 0?void 0:F.$el,!(E!=null&&E.contains(H))){L.next=8;break}return L.abrupt("return");case 8:d&&clearTimeout(d),d=setTimeout(function(){v.unref(a)&&p()},0);case 10:case"end":return L.stop()}},T)}));return function(T){return x.apply(this,arguments)}}();v.watch(a,function(){v.unref(a)&&(f(),clearTimeout(d))});var _,w=v.ref(i.max>v.unref(n).length),y=v.computed(function(){return typeof i.popupContainer=="string"||Wl(i.popupContainer)==="object"&&i.popupContainer!=null?i.popupContainer:"body"}),S=v.computed(function(){return typeof i.popupContainer=="boolean"&&i.popupContainer===!1}),R=v.computed(function(){return i.theme});v.watch(function(){return[i.theme,v.unref(c)]},function(){v.nextTick(function(){var x,T;(x=v.unref(m))===null||x===void 0||x.setAttribute("pick-colors-theme",v.unref(R)),(T=v.unref(c))===null||T===void 0||(T=T.$el)===null||T===void 0||T.setAttribute("pick-colors-theme",v.unref(R))})},{immediate:!0}),v.provide("theme",{theme:R});var A=v.ref([]);return v.onMounted(function(){document.addEventListener("mouseup",C,!1),i.showPicker&&f()}),v.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?v.unref(n).length>0:v.unref(n).length>1)&&v.unref(s)===x},selectedColor:l,selectedIndex:s,isShowPicker:a,addColorItemShow:w,onPickerChange:function(x){var T=v.unref(s),M=v.unref(n).slice(),B=v.unref(n).length;if(T!=null){T>=0?M[T]=x:(s.value=B,M.push(x));var P="";P=Array.isArray(i.value)||i.addColor?M:x,n.value=Array.isArray(P)?P:[P],e("update:value",P),e("change",P,x,T),i.addColor&&B>=i.max&&(w.value=!1,e("overflowMax"))}},colorPicker:m,onColorClick:b,pickerRef:c,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var T=x.target;_=+T.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var T=+x.target.dataset.index,M=eU(v.unref(n)),B=M[_];M.splice(_,1);var P=M.slice(0,T),F=M.splice(T),H=P.concat([B]).concat(F);e("update:value",H),e("change",H,H[_],_)},colorItemsRef:A,pickerStyle:g,values:o,teleportDisabled:S,toPopupContainer:y,formatValue:r,onFormatChange:function(x){r.value=x,e("formatChange",x)}}}});Ro(".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)}"),af.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item"),l=v.resolveComponent("add-color-item"),a=v.resolveComponent("picker");return v.openBlock(),v.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:t[0]||(t[0]=v.withModifiers(function(){return i.onColorItemDragStart&&i.onColorItemDragStart.apply(i,arguments)},["stop"])),onDragover:t[1]||(t[1]=v.withModifiers(function(){return i.onColorItemDragOver&&i.onColorItemDragOver.apply(i,arguments)},["prevent","stop"])),onDrop:t[2]||(t[2]=v.withModifiers(function(){return i.onColorItemDrop&&i.onColorItemDrop.apply(i,arguments)},["prevent","stop"])),onClick:t[3]||(t[3]=v.withModifiers(function(){return i.onColorClick&&i.onColorClick.apply(i,arguments)},["stop"]))},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.values,function(h,d){return v.openBlock(),v.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?(v.openBlock(),v.createBlock(l,{key:0,class:"add-color-item",ref:"addColorItem",selected:i.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):v.createCommentVNode("v-if",!0),(v.openBlock(),v.createBlock(v.Teleport,{to:i.toPopupContainer,disabled:i.teleportDisabled},[v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowPicker?(v.openBlock(),v.createBlock(a,{key:0,class:"picker",style:v.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"])):v.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},af.__scopeId="data-v-3c43ade8",af.__file="src/ColorPicker.vue";const vX="",pU=v.defineComponent({name:"ColorPick",components:{PickColors:af},props:{value:{type:String,default:""}},setup(i,{emit:t}){const e=v.ref(i.value);v.watch(()=>i.value,o=>{e.value=o},{immediate:!0});function n(){t("changeProp",v.unref(e))}return{myValue:e,onChange:n}}}),mU={class:"color-pick"};function vU(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("pick-colors");return v.openBlock(),v.createElementBlock("div",mU,[v.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"]),v.createVNode(l,{value:i.myValue,"onUpdate:value":t[1]||(t[1]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"])])}const bU=Ti(pU,[["render",vU],["__scopeId","data-v-99378939"]]),CU=v.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 yU(i,t,e,n,o,r){const s=v.resolveComponent("a-radio-group");return v.openBlock(),v.createBlock(s,{value:i.value,size:"small",onChange:i.onChange,options:i.options,optionType:"button"},null,8,["value","onChange","options"])}const _U=Ti(CU,[["render",yU]]),bX="",wU=v.defineComponent({name:"PropertyConfig",components:{ColorPick:bU,Radio:_U},props:{config:{type:Object,default(){return{}}},selectedIndex:{type:Boolean}},setup(i){const t=v.inject("theme","light"),e=[{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"}],n=v.ref([]);v.watch(()=>i.selectedIndex,()=>{if(i.selectedIndex>-1){const l=Object.keys(i.config);n.value=l}});function o(l,a){i.config[l]=a}function r(l,a){if(l.target.checked)i.config[a]="",v.unref(n).push(a);else{delete i.config[a];const h=v.unref(n).indexOf(a);v.unref(n).splice(h,1)}}const s=v.computed(()=>v.unref(t)==="darkBlue"?"#b2c3dd":"");return{formConfig:e,handleSelect:r,selectedProperty:n,onChange:o,fontColor:s}}}),SU={class:"content"},xU={class:"list"};function AU(i,t,e,n,o,r){const s=v.resolveComponent("a-checkbox");return v.openBlock(),v.createElementBlock("div",SU,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor,height:"32px",lineHeight:"32px"})},"属性配置",4),v.createElementVNode("div",xU,[i.selectedIndex>-1?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:0},v.renderList(i.formConfig,({label:l,component:a,props:h,key:d},u)=>(v.openBlock(),v.createElementBlock("div",{class:"list-item",style:{display:"flex"},key:u},[v.createVNode(s,{checked:i.selectedProperty.includes(d),onChange:c=>i.handleSelect(c,d)},null,8,["checked","onChange"]),v.createElementVNode("span",{style:v.normalizeStyle({padding:"0 8px",color:i.fontColor})},v.toDisplayString(l),5),i.selectedProperty.includes(d)?(v.openBlock(),v.createBlock(v.resolveDynamicComponent(a),v.mergeProps({key:0,value:i.config[d],ref_for:!0},h,{onChangeProp:c=>i.onChange(d,c)}),null,16,["value","onChangeProp"])):v.createCommentVNode("",!0)]))),128)):v.createCommentVNode("",!0)])])}const RU=Ti(wU,[["render",AU],["__scopeId","data-v-b2df2e2d"]]),TU=v.defineComponent({name:"ConditionalProperty",props:{},components:{ConditionalItemConfig:N$,ConditionalConfig:Y$,PropertyConfig:RU},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref([]),r=v.ref(-1),s=v.inject("theme","light"),l=v.inject("getContainer",()=>{});let a="";const h=v.computed(()=>v.unref(r)>-1?v.unref(o)[v.unref(r)]:{});function d(f,p=[]){a=f,o.value=p,n.value=!0}function u(f){r.value=f}function c(){t("change",a,v.unref(o)),r.value=-1,n.value=!1}function g(){r.value=-1,o.value=[]}return v.watch(n,f=>{window.modalShow&&window.modalShow(f)}),e({showModal:d}),{theme:s,visible:n,config:o,changeSelectedItem:u,selectedConfig:h,selectedIndex:r,handleOk:c,handleClear:g,getContainer:l}}}),MU={style:{display:"flex"}};function BU(i,t,e,n,o,r){const s=v.resolveComponent("conditional-item-config"),l=v.resolveComponent("conditional-config"),a=v.resolveComponent("property-config"),h=v.resolveComponent("a-button"),d=v.resolveComponent("a-modal");return v.openBlock(),v.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,getContainer:i.getContainer,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(h,{onClick:t[0]||(t[0]=u=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(h,{onClick:i.handleClear},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("清除筛选")])),_:1},8,["onClick"]),v.createVNode(h,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[4]||(t[4]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",MU,[v.createVNode(s,{config:i.config,onChange:i.changeSelectedItem},null,8,["config","onChange"]),v.createVNode(l,{config:i.selectedConfig.conditions,isSelected:i.selectedIndex>-1},null,8,["config","isSelected"]),v.createVNode(a,{config:i.selectedConfig,selectedIndex:i.selectedIndex},null,8,["config","selectedIndex"])])]),_:1},8,["wrapClassName","visible","getContainer","onOk"])}const PU=Ti(TU,[["render",BU]]),CX="",HU=v.defineComponent({name:"PivotChart",props:{data:{type:Object,default(){return{dimensionData:{},xLabel:"",yLabel:""}}}},components:{FilterOutlined:rM,MinusSquareOutlined:p$,PivotFilter:BT},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.ref();let o;const r=v.ref([]),s=v.computed(()=>{var H;return(H=v.unref(r)[v.unref(r).length-1])==null?void 0:H.key}),l=v.ref([]),a=v.ref(!1),h=v.ref(),d=v.ref({});let u={};const c=v.reactive({position:"absolute",top:"0",left:"0"});let g="",f;function p(){l.value=[],r.value=[],u={};const{dimensionData:H,xLabel:E}=i.data,L=H[E].map(I=>I.value);b(E,L),v.unref(r).push({key:E,drillValue:"",xAxisData:L}),C()}let m=[];v.onMounted(()=>{o=MB.init(n.value),w()});function b(H,E){const{yLabel:L,records:I}=i.data;let k=[];E.forEach(()=>{k.push(0)}),I.forEach(D=>{if(D[L]!==void 0){const O=E.indexOf(D[H]);if(O>-1){let N=!0;v.unref(r).forEach(j=>{j.drillValue&&D[j.key]!==j.drillValue&&(N=!1)});const z=Number(D[L]);N&&!isNaN(z)&&(k[O]+=Number(z))}}}),k=k.map(D=>D.toFixed(2)),f={tooltip:{},xAxis:{data:E},yAxis:{},series:[{name:L,type:"bar",label:{show:!0,position:"top"},data:k}]},m=k,o.setOption(f)}function C(){const H=Object.keys(i.data.dimensionData),E=v.unref(r).map(I=>I.key),L=[];H.forEach(I=>{E.includes(I)||L.push(I)}),l.value=L}function _(){g="",a.value=!1}function w(){o.on("contextmenu",function(H){const{event:{event:E},name:L}=H;g=L,E.preventDefault(),c.left=E.offsetX+90+"px",c.top=E.offsetY+80+"px",a.value=!0}),document.addEventListener("click",_)}function y(H){const E=[],{records:L}=i.data;for(const I of L){let k=!0;for(const D of v.unref(r))D.drillValue&&I[D.key]!==D.drillValue&&(k=!1);k&&!E.includes(I[H])&&E.push(I[H])}return E}function S(H){v.unref(r)[v.unref(r).length-1].drillValue=g;const E=y(H);b(H,E),v.unref(r).push({key:H,drillValue:"",xAxisData:E}),C()}function R(H,E){v.unref(r).splice(H+1,v.unref(r).length-H-1),v.unref(r)[H].drillValue="";const L=y(E);b(E,L),B(),C()}function A(H,E){const L=f.series[0].data,I=f.xAxis.data,k=L.map((O,N)=>({value:O,label:I[N]}));let D;E==="asc"?H==="dimension"?D=k.sort((O,N)=>O.label.localeCompare(N.label)):D=k.sort((O,N)=>O.value-N.value):E==="desc"&&(H==="dimension"?D=k.sort((O,N)=>N.label.localeCompare(O.label)):D=k.sort((O,N)=>N.value-O.value)),f.series[0].data=D.map(O=>O.value),f.xAxis.data=D.map(O=>O.label),o.setOption(f)}function x(H){if(H==="dimension"){const E=y(v.unref(s));b(v.unref(s),E),B()}else u={},B()}function T(H){if(H==="dimension"){const E=v.unref(r)[v.unref(r).length-1].xAxisData.map(L=>({value:L}));d.value={fieldName:v.unref(s),key:v.unref(s),type:H,filterData:f.xAxis.data,valueList:E}}else H==="indicators"&&(d.value={fieldName:i.data.yLabel,key:i.data.yLabel,type:"indicators",filterData:u});v.nextTick(()=>{v.unref(h).showModal()})}function M({checkKeys:H,type:E}){E==="dimension"?b(v.unref(s),H):E==="indicators"&&(u=H,B())}function B(){const H=v.unref(r)[v.unref(r).length-1].xAxisData;let E=m.map((L,I)=>({value:L,label:H[I]}));E=E.filter(L=>P(L.value)),f.series[0].data=E.map(L=>L.value),f.xAxis.data=E.map(L=>L.label),o.setOption(f)}function P(H){let E=!1,{rule:L,value:I}=u;switch(I=Number(I),L){case"LESS":E=H<I;break;case"GREATER":E=H>I;break;case"EQUAL":E=H===I;break;case"NOT_EQUAL":E=H!==I;break;default:E=!0;break}return E}v.onBeforeUnmount(()=>{document.removeEventListener("click",_)}),t({init:p});const F=v.computed(()=>v.unref(e)==="darkBlue"?"#b2c3dd":"");return{echartRef:n,dropdownList:l,isShowMenu:a,curXLabel:s,menuStyle:c,drillDimension:S,dimensionMap:r,deleteDimension:R,handleSort:A,handleClear:x,handleFilter:T,pivotFilterRef:h,filterData:d,onFilterChange:M,fontColor:F}}}),EU={style:{display:"flex",height:"400px"}},kU={style:{flex:"0 0 200px"}},LU={style:{flex:"0 0 650px",height:"100%"}},FU={key:0,style:{display:"flex","align-items":"center"}},IU={key:0,class:"dimension-item"},DU={key:1,style:{height:"30px"}},OU={style:{width:"100%",height:"100%"},ref:"echartRef"},zU=["onClick"];function WU(i,t,e,n,o,r){const s=v.resolveComponent("filter-outlined"),l=v.resolveComponent("a-menu-item"),a=v.resolveComponent("a-menu"),h=v.resolveComponent("a-dropdown"),d=v.resolveComponent("minus-square-outlined"),u=v.resolveComponent("pivot-filter");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",EU,[v.createElementVNode("div",kU,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 横轴:"+v.toDisplayString(i.curXLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[0]||(t[0]=c=>i.handleSort("dimension","asc"))},{default:v.withCtx(()=>t[8]||(t[8]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[1]||(t[1]=c=>i.handleSort("dimension","desc"))},{default:v.withCtx(()=>t[9]||(t[9]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[2]||(t[2]=c=>i.handleFilter("dimension"))},{default:v.withCtx(()=>t[10]||(t[10]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[3]||(t[3]=c=>i.handleClear("dimension"))},{default:v.withCtx(()=>t[11]||(t[11]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4),v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 纵轴:"+v.toDisplayString(i.data.yLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[4]||(t[4]=c=>i.handleSort("indicators","asc"))},{default:v.withCtx(()=>t[12]||(t[12]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[5]||(t[5]=c=>i.handleSort("indicators","desc"))},{default:v.withCtx(()=>t[13]||(t[13]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[6]||(t[6]=c=>i.handleFilter("indicators"))},{default:v.withCtx(()=>t[14]||(t[14]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[7]||(t[7]=c=>i.handleClear("indicators"))},{default:v.withCtx(()=>t[15]||(t[15]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4)]),v.createElementVNode("div",LU,[i.dimensionMap.length>1?(v.openBlock(),v.createElementBlock("div",FU,[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},"钻取维度:",4),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dimensionMap,(c,g)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:g},[c.drillValue?(v.openBlock(),v.createElementBlock("div",IU,[v.createVNode(d,{class:"dimension-icon",onClick:f=>i.deleteDimension(g,c.key)},null,8,["onClick"]),v.createTextVNode(v.toDisplayString(c.key)+"("+v.toDisplayString(c.drillValue)+") ",1)])):v.createCommentVNode("",!0)],64))),128))])):(v.openBlock(),v.createElementBlock("div",DU)),v.createElementVNode("div",OU,null,512)]),v.withDirectives(v.createElementVNode("div",{style:v.normalizeStyle(i.menuStyle),class:"dropdown-menu"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dropdownList,c=>(v.openBlock(),v.createElementBlock("div",{class:"item",key:c,onClick:g=>i.drillDimension(c)},"下钻"+v.toDisplayString(c),9,zU))),128))],4),[[v.vShow,i.isShowMenu]])]),v.createVNode(u,{ref:"pivotFilterRef",data:i.filterData,onChange:i.onFilterChange},null,8,["data","onChange"])],64)}const NU=Ti(HU,[["render",WU],["__scopeId","data-v-f29855b0"]]),VU=v.defineComponent({components:{PivotChart:NU},name:"ChartModal",props:{},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.inject("getContainer",()=>{}),o=v.ref(!1),r=v.ref({}),s=v.ref();function l(a){r.value=a,o.value=!0,v.nextTick(()=>{s.value.init()})}return v.watch(o,a=>{window.modalShow&&window.modalShow(a)}),t({showModal:l}),{theme:e,visible:o,chartOptions:r,chartRef:s,getContainer:n}}});function jU(i,t,e,n,o,r){const s=v.resolveComponent("pivot-chart"),l=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(l,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=a=>i.visible=a),title:"图形",style:{width:"900px"},destroyOnClose:!0,footer:null,getContainer:i.getContainer},{default:v.withCtx(()=>[v.createVNode(s,{data:i.chartOptions,ref:"chartRef"},null,8,["data"])]),_:1},8,["wrapClassName","visible","getContainer"])}const $U=Ti(VU,[["render",jU]]),GU=v.defineComponent({name:"PivotAggregate",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("getContainer",()=>{}),o=v.inject("theme","light"),r=v.inject("dimensionFieldList",[]),s=v.ref(!1),l=v.ref([]),a=v.ref(""),h=v.ref(""),d=[{label:"合计",value:"SUM"},{label:"平均值",value:"AVG"},{label:"计数",value:"COUNT"},{label:"最大值",value:"MAX"},{label:"最小值",value:"MIN"},{label:"方差",value:"VAR"},{label:"标准差",value:"STDEV"}];function u(){t("confirm",v.unref(l),a.value),s.value=!1}function c(p,m){l.value=Xe.cloneDeep(p),a.value=m,s.value=!0;const b=v.unref(r).find(C=>C.label===m);h.value=(b==null?void 0:b.title)||m}const g=v.computed(()=>({})),f=()=>document.getElementsByClassName("aggregate-modal")[0]||document.body;return v.watch(s,p=>{window.modalShow&&window.modalShow(p)}),e({showModal:c}),{theme:o,visible:s,aggregationType:l,options:d,dimensionKey:a,titleText:h,dropdownStyle:g,handleOk:u,getPopupContainer:f,getContainer:n}}});function UU(i,t,e,n,o,r){const s=v.resolveComponent("a-select"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.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.titleText+"-聚合",destroyOnClose:!1,maskClosable:!1,getContainer:i.getContainer,onOk:i.handleOk,onCancel:t[2]||(t[2]=d=>i.visible=!1)},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"聚合方式"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.aggregationType,"onUpdate:value":t[0]||(t[0]=d=>i.aggregationType=d),allowClear:"",mode:"multiple",dropdownClassName:"pivot-table-select-dropdown",options:i.options,dropdownStyle:i.dropdownStyle,getPopupContainer:i.getPopupContainer},null,8,["value","options","dropdownStyle","getPopupContainer"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","getContainer","onOk"])}const KU=Ti(GU,[["render",UU]]),YU=v.defineComponent({name:"PivotTop",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("getContainer",()=>{}),r=v.ref(!1),s=v.ref(""),l=v.ref("");function a(){t("confirm",{value:v.unref(s),key:v.unref(l)}),r.value=!1}function h(d){const{value:u,key:c}=d;s.value=u,r.value=!0,l.value=c}return v.watch(r,d=>{window.modalShow&&window.modalShow(d)}),e({showModal:h}),{theme:n,visible:r,topNum:s,handleOk:a,getContainer:o}}});function XU(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.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,getContainer:i.getContainer,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"维度取Top"},{default:v.withCtx(()=>[v.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","getContainer","onOk"])}const qU=Ti(YU,[["render",XU]]);let Ms=(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 yX="";Ho.locale("zh-cn");const ZU=v.defineComponent({name:"PivotDetail",components:{ATable:Vi.Table},props:{},setup(i,{emit:t,expose:e}){const n=v.inject("getContainer",()=>{}),o=v.inject("theme","light"),r=v.inject("pageId",""),s=v.inject("context",""),l=v.inject("indicatorUrl",""),a=v.inject("indicatorToken",""),h=v.inject("theDateInfo",{}),d=v.ref(!1),u=v.ref(!1),c=v.ref([]),g=v.ref([]),f=v.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showTotal:b=>`共 ${b} 条数据`});async function p(b){var x;u.value=!0,d.value=!0;const{args:C={},dimension:_,indicator:w,splitSymbol:y}=b,{originData:S=[],cellHeaderPaths:{colHeaderPaths:R=[],rowHeaderPaths:A=[]}}=C;if(S!=null&&S.length){const T=S[0],M=R!=null&&R.length?R[R.length-1]:"",B=R.filter(O=>O.dimensionKey).concat(A.filter(O=>O.dimensionKey)).map(O=>O.dimensionKey);if(!(M!=null&&M.indicatorKey)||!B.length)return;const P=w.find(O=>O.label===M.indicatorKey),F={};for(const O of _)if(B.includes(O.label)){const z=(T[O.label]||"").split(y)||[];F[O.typeGuid]=z!=null&&z.length?z[z.length-1]:""}const{startTime:H,endTime:E,rangeFormat:L}=v.unref(h);H&&E&&(F.startTime=Ho(H).format(L),F.endTime=Ho(E).format(L));const I=await Dr.post(`${v.unref(l)}/diagram/obtainDataSetData`,{pageId:v.unref(r),indexCode:(P==null?void 0:P.indexCode)||"",param:F},{headers:{Authentication:v.unref(a),operateContext:v.unref(s)}}),{columns:k=[],data:D=[]}=((x=I==null?void 0:I.data)==null?void 0:x.data)||{};c.value=k.filter(O=>O).map(O=>({title:O,dataIndex:O})),g.value=D.map(O=>({...O,uid:Ms(6)}))}u.value=!1}v.watch(d,b=>{window.modalShow&&window.modalShow(b)});const m=b=>{v.unref(f).current=b.current};return e({showModal:p}),{theme:o,visible:d,loading:u,pagination:f,columns:c,dataSource:g,handleTableChange:m,getContainer:n}}}),JU={key:0,class:"spin-container"};function QU(i,t,e,n,o,r){const s=v.resolveComponent("a-spin"),l=v.resolveComponent("a-table"),a=v.resolveComponent("a-modal");return v.openBlock(),v.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"},getContainer:i.getContainer},{default:v.withCtx(()=>[i.loading?(v.openBlock(),v.createElementBlock("div",JU,[v.createVNode(s,{size:"large"})])):v.createCommentVNode("",!0),i.loading?v.createCommentVNode("",!0):(v.openBlock(),v.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","getContainer"])}const tK=Ti(ZU,[["render",QU],["__scopeId","data-v-32537b22"]]),eK=(i,t)=>{i.register.icon("dropdownIcon",{type:"svg",svg:`<svg width="${t.downSize}" height="${t.downSize}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><rect x="2" y="1" width="20" height="20" rx="10" fill="white"/><rect x="2.5" y="1.5" width="19" height="19" rx="9.5" stroke="#959DA5"/></g><path d="M14.9492 9.39531C15.0086 9.31911 15.0165 9.21887 14.9698 9.1356C14.923 9.05234 14.8294 9 14.7273 9L9.27273 9C9.17057 9 9.07697 9.05234 9.03023 9.1356C8.98348 9.21887 8.99142 9.31911 9.0508 9.39531L11.7781 12.8953C11.8293 12.961 11.9119 13 12 13C12.0881 13 12.1707 12.961 12.2219 12.8953L14.9492 9.39531Z" fill="#4F5965"/></svg>`,width:t.downSize,height:t.downSize,funcType:i.TYPES.IconFuncTypeEnum.dropDown,positionType:i.TYPES.IconPosition.absoluteRight,name:"dropdownIcon",marginRight:0,hover:{width:t.downSize,height:t.downSize,bgColor:"rgba(101, 117, 168, 0.1)",image:`<svg width="${t.downSize}" height="${t.downSize}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><rect x="2" y="1" width="20" height="20" rx="10" fill="#1E54C9"/><rect x="2.5" y="1.5" width="19" height="19" rx="9.5" stroke="#141414" stroke-opacity="0.2"/></g><path d="M14.9492 9.39531C15.0086 9.31911 15.0165 9.21887 14.9698 9.1356C14.923 9.05234 14.8294 9 14.7273 9L9.27273 9C9.17057 9 9.07697 9.05234 9.03023 9.1356C8.98348 9.21887 8.99142 9.31911 9.0508 9.39531L11.7781 12.8953C11.8293 12.961 11.9119 13 12 13C12.0881 13 12.1707 12.961 12.2219 12.8953L14.9492 9.39531Z" fill="white"/></svg>`},cursor:"pointer",visibleTime:"mouseenter_cell"}),i.register.icon("sortDown",{name:"sortDown",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:t.iconSize,visibleTime:"always",height:t.iconSize,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:t.hoverSize,height:t.hoverSize,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"取消排序",placement:"top"}}),i.register.icon("sortUp",{name:"sortUp",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:t.iconSize,visibleTime:"always",height:t.iconSize,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:t.hoverSize,height:t.hoverSize,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击降序",placement:"top"}}),i.register.icon("sortNormal",{name:"sortNormal",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:t.iconSize,visibleTime:"always",height:t.iconSize,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:t.hoverSize,height:t.hoverSize,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击升序",placement:"top"}})},iK=v.defineComponent({props:{node:{type:[Object,String],required:!0}},render(){return this.node}}),nK={mounted(i){i.focus()}},oK=v.defineComponent({name:"PivotConfig",directives:{focus:nK},props:{fullMode:{type:Boolean,default:!1}},components:{VNodeRender:iK,draggable:Ab,DeleteOutlined:nM},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("getContainer",()=>{}),r=v.ref(!1),s=v.ref(),l=v.ref([]),a=v.ref([{title:"行维度",icon:v.createVNode(o$),fields:[]},{title:"列维度",icon:v.createVNode(t$),fields:[]},{title:"指标",icon:v.createVNode(P$),fields:[]}]),h=(R=[],A=[])=>{for(const x of v.unref(a))x.fields=[];for(const x of R)x.positionType==="rows"?v.unref(a)[0].fields.push(Xe.cloneDeep(x)):x.positionType==="columns"&&v.unref(a)[1].fields.push(Xe.cloneDeep(x));v.unref(a)[2].fields=Xe.cloneDeep(A),r.value=!0},d=v.computed(()=>[...v.unref(a)[0].fields.map(R=>({...R,label:R.showTitle,positionType:"rows"})),...v.unref(a)[1].fields.map(R=>({...R,label:R.showTitle,positionType:"columns"}))]),u=v.computed(()=>v.unref(a)[2].fields),c=()=>{l.value=[],t("confirm",v.unref(d),v.unref(u)),r.value=!1},g=(R,A)=>{const x=A[R.oldIndex],{scope:T}=x;["IDX","BUILT_IN_IDX"].includes(T)?l.value=[0,1]:["DIM","BUILT_IN_DIM"].includes(T)&&(l.value=[2])},f=()=>{l.value=[]},p=()=>{a.value=Xe.cloneDeep(v.unref(a))},m=(R,A)=>{v.unref(a)[R].fields.splice(A,1)},b=v.ref(),C=v.ref(),_=v.ref(""),w=(R,A)=>{i.fullMode&&(b.value=`${R}_${A}`,C.value=Xe.cloneDeep(v.unref(a)[R].fields[A]))},y=()=>{if(v.unref(_)){const R=v.unref(b).split("_");Vi.message.error(v.unref(_)),v.unref(a)[R[0]].fields[R[1]].showTitle=v.unref(C).showTitle,_.value=""}b.value=""},S=R=>{const A=R.target.value,x=v.unref(d).concat(v.unref(u));A?x.find(M=>M.name!==v.unref(C).name&&M.showTitle===A)&&(_.value="名称不能重复"):_.value="不能为空"};return v.watch(r,R=>{window.modalShow&&window.modalShow(R)}),e({showModal:h}),{theme:n,visible:r,fieldAreas:a,indSourceRef:s,maskList:l,currentEditItem:b,handleOk:c,onDragAreaStart:g,onDragEnd:f,handleDeleteField:m,handleEdit:w,onConfirmLabel:y,onDragAdd:p,onChangeLabel:S,getContainer:o}}}),_X="",rK={class:"config-wrap"},sK={class:"area-content"},lK={class:"area-title"},aK={class:"field-item"},hK=["onClick"];function dK(i,t,e,n,o,r){const s=v.resolveComponent("v-node-render"),l=v.resolveComponent("a-input"),a=v.resolveComponent("delete-outlined"),h=v.resolveComponent("draggable"),d=v.resolveComponent("a-button"),u=v.resolveComponent("a-modal"),c=v.resolveDirective("focus");return v.openBlock(),v.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},getContainer:i.getContainer,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(d,{onClick:t[0]||(t[0]=g=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(d,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",rK,[v.createElementVNode("div",sK,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.fieldAreas,(g,f)=>(v.openBlock(),v.createElementBlock("div",{class:"area-item",key:f},[v.createElementVNode("div",lK,[v.createVNode(s,{class:"area-icon",node:g.icon},null,8,["node"]),v.createTextVNode(" "+v.toDisplayString(g.title),1)]),v.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:v.withCtx(({index:p,element:m})=>[v.createElementVNode("div",aK,[i.currentEditItem===`${f}_${p}`?v.withDirectives((v.openBlock(),v.createBlock(l,{key:0,size:"small",value:m.showTitle,"onUpdate:value":b=>m.showTitle=b,onPressEnter:i.onConfirmLabel,onBlur:i.onConfirmLabel,onChange:i.onChangeLabel},null,8,["value","onUpdate:value","onPressEnter","onBlur","onChange"])),[[c]]):(v.openBlock(),v.createElementBlock("div",{key:1,style:{width:"100%"},onClick:b=>i.handleEdit(f,p)},v.toDisplayString(m.showTitle),9,hK)),i.fullMode?(v.openBlock(),v.createBlock(a,{key:2,style:{color:"red","padding-left":"8px"},onClick:b=>i.handleDeleteField(f,p)},null,8,["onClick"])):v.createCommentVNode("",!0)])]),_:2},1032,["list","disabled","onStart","onEnd","onAdd"])]))),128))])])]),_:1},8,["wrapClassName","visible","getContainer","onOk"])}const uK=Ti(oK,[["render",dK],["__scopeId","data-v-b39c2a7b"]]),cK=v.defineComponent({name:"IndSourceList",components:{CaretRightOutlined:Bj,CaretDownOutlined:Aj,LoadingOutlined:a$,Draggable:Ab},props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},isSub:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1}},setup(i,{emit:t,expose:e}){const n=v.inject("indicatorUrl",""),o=v.inject("indicatorToken",""),r=v.inject("pageId",""),s=v.inject("setItemDisabled",S=>!1),l=v.ref([]),a=v.ref(),h=v.reactive({pageSize:20,currentPage:1,totalResult:0}),d=v.ref(!1),u=v.ref(""),c=v.ref(!1);v.watch(()=>i.data,S=>{i.isSub&&(S==null||S.forEach(R=>{var A;R!=null&&R.isLeaf||(A=R.dataViewColumns)==null||A.forEach(x=>{x.show=!0,x.edit=!1,x.title&&(x.label=x.title)})}),l.value=S)},{deep:!0,immediate:!0});const g=()=>{var S;i.isSub||(S=v.unref(a))==null||S.removeEventListener("scroll",_)},f=async S=>{var A;if(v.unref(d))return;d.value=!0;const R={source:i.config.source||"INDICATOR_LIB",pageId:v.unref(r),dataSourceId:i.config.dataSourceId||"",indexName:u.value};S?(S.loading=!0,R.indexTypeGuid=S.indexTypeGuid,R.isLeaf=S.isLeaf):h&&(R.queryRequest={pageSize:h.pageSize,pageNum:h.currentPage});try{const x=await Dr.post(`${v.unref(n)}/diagram/sourceList`,R,{headers:{Authentication:o,operateContext:"ygt"}}),{success:T,data:M={}}=x.data;if(T){const{rows:B=[],total:P=0}=M;B==null||B.forEach(F=>{var H;(S==null?void 0:S.isLeaf)==="1"?(H=F.dataViewColumns)==null||H.forEach(E=>{E.show=!0,E.edit=!1,E.title&&(E.label=E.title)}):F.show=!1}),S?(S.children=B,S.show=!0,B!=null&&B.length||(S.noData=!0)):(l.value=v.unref(l).concat(B),h.totalResult=+P,((A=v.unref(l))==null?void 0:A.length)>=P&&g())}S&&(S.loading=!1),d.value=!1}catch{S&&(S.loading=!1),d.value=!1}},p=async S=>{const R=l.value[S],{children:A=[]}=R;A!=null&&A.length?R.show=!R.show:!R.noData&&R.isLeaf?f(R):R.noData&&(R.show=!R.show)},m=(S,R)=>{t("onDragStart",S,R)},b=()=>{t("onDragEnd")},C=S=>{S.show=!S.show},_=S=>{S.target.scrollTop+S.target.clientHeight+20>=S.target.scrollHeight&&(h.currentPage++,f())},w=async()=>{await f(),v.nextTick(async()=>{v.unref(a).scrollHeight===v.unref(a).clientHeight&&h.totalResult>v.unref(l).length&&(h.currentPage++,w())})},y=async S=>{var R;g(),c.value=!0,h.currentPage=1,h.totalResult=0,l.value=[],u.value=S,await w(),c.value=!1,(R=v.unref(a))==null||R.addEventListener("scroll",_)};return v.onMounted(async()=>{var S;i.isSub||(w(),(S=v.unref(a))==null||S.addEventListener("scroll",_))}),v.onUnmounted(()=>{g()}),e({handleSearch:y}),{columnRef:a,sourceList:l,searchLoading:c,onToggleGroup:p,onToggleSource:C,setItemDisabled:s,onDragStart:m,onDragEnd:b,mapDataSetScope:D2,mapScope:I2,getLoadType:O2,getUseType:z2,getSourceType:W2}}}),wX="",gK={key:0,class:"no-data"},fK={class:"column-item"},pK=["onClick"],mK={key:3,class:"item-name"},vK={class:"column-item"},bK={key:0},CK={key:1},yK={key:2},_K={key:3},wK=["onClick"],SK={class:"item-name"},xK={class:"column-child-item"},AK={class:"field"},RK={class:"column-child-item-name"};function TK(i,t,e,n,o,r){const s=v.resolveComponent("loading-outlined"),l=v.resolveComponent("caret-down-outlined"),a=v.resolveComponent("caret-right-outlined"),h=v.resolveComponent("ind-source-list",!0),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("draggable"),c=v.resolveComponent("a-spin");return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["columns",i.isSub?"sub-columns":""]),ref:"columnRef"},[v.createVNode(c,{spinning:i.searchLoading,tip:"数据源加载中..."},{default:v.withCtx(()=>{var g;return[!((g=i.sourceList)!=null&&g.length)&&!i.searchLoading?(v.openBlock(),v.createElementBlock("div",gK,"暂无数据")):i.hasChildren?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:1},v.renderList(i.sourceList,(f,p)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:f.indexTypeGuid||f.id},[v.createElementVNode("div",fK,[v.createElementVNode("span",{class:"item-group",onClick:m=>i.onToggleGroup(p)},[f.loading?(v.openBlock(),v.createBlock(s,{key:0})):f.show?(v.openBlock(),v.createBlock(l,{key:1})):(v.openBlock(),v.createBlock(a,{key:2})),f.isLeaf?(v.openBlock(),v.createElementBlock("span",mK,v.toDisplayString(f.indexTypeCode+"."+f.indexTypeName),1)):v.createCommentVNode("",!0)],8,pK)]),f.show?(v.openBlock(),v.createBlock(h,{key:0,data:f.children,isSub:!0,hasChildren:f.isLeaf==="0",config:i.config,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd},null,8,["data","hasChildren","config","onOnDragStart","onOnDragEnd"])):v.createCommentVNode("",!0)],64))),128)):(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:2},v.renderList(i.sourceList,f=>(v.openBlock(),v.createElementBlock("div",{key:f.id,class:v.normalizeClass(i.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[v.createElementVNode("div",vK,[v.createVNode(d,null,{title:v.withCtx(()=>[v.createElementVNode("div",null,"加载类型:"+v.toDisplayString(i.getLoadType(f.loadType)),1),f.useType?(v.openBlock(),v.createElementBlock("div",bK,"数据使用系统:"+v.toDisplayString(i.getUseType(f.useType)),1)):v.createCommentVNode("",!0),f.systemSource?(v.openBlock(),v.createElementBlock("div",CK,"制度出处:"+v.toDisplayString(f.systemSource),1)):v.createCommentVNode("",!0),f.dataTo?(v.openBlock(),v.createElementBlock("div",yK,"数据来源:"+v.toDisplayString(i.getSourceType(f.dataTo)),1)):v.createCommentVNode("",!0),f.meaning?(v.openBlock(),v.createElementBlock("div",_K,"指标含义:"+v.toDisplayString(f.meaning),1)):v.createCommentVNode("",!0)]),default:v.withCtx(()=>[v.createElementVNode("span",{class:"item-group",onClick:p=>i.onToggleSource(f)},[f.show?(v.openBlock(),v.createBlock(l,{key:0})):(v.openBlock(),v.createBlock(a,{key:1})),v.createElementVNode("span",SK,v.toDisplayString((f.indexCode?f.indexCode:"")+" "+f.name),1)],8,wK)]),_:2},1024)]),f.show?(v.openBlock(),v.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:v.withCtx(({element:p})=>[v.createElementVNode("div",xK,[v.createElementVNode("span",AK,"【"+v.toDisplayString(p.scope==="FIELD"?i.mapDataSetScope(p.genericType):i.mapScope(p.scope))+"】",1),v.createElementVNode("span",RK,v.toDisplayString(p.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart","onEnd"])):v.createCommentVNode("",!0)],2))),128))]}),_:1},8,["spinning"])],2)}const MK=Ti(cK,[["render",TK],["__scopeId","data-v-aabcdc1c"]]),BK=v.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")}}}}),SX="";function PK(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"drag-area",style:v.normalizeStyle(i.style.main)},[i.maskList.includes(2)?(v.openBlock(),v.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:v.normalizeStyle(i.style.filters)},null,36)):v.createCommentVNode("",!0),i.maskList.includes(0)?v.createCommentVNode("",!0):(v.openBlock(),v.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:v.normalizeStyle(i.style.rows)},null,36)),i.maskList.includes(1)?v.createCommentVNode("",!0):(v.openBlock(),v.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:v.normalizeStyle(i.style.columns)},null,36)),i.maskList.includes(2)?v.createCommentVNode("",!0):(v.openBlock(),v.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:v.normalizeStyle(i.style.indicators)},null,36))],4)}const HK=Ti(BK,[["render",PK],["__scopeId","data-v-01e4c58d"]]),EK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r}=i;return async(l={},a,h)=>{var f;const d=AC(i,l),{url:u,...c}=d||{};let g=t;if(!g){const{pathname:p}=window==null?void 0:window.location;if(p){const m=p.split("/");m!=null&&m.length&&(g=m[m.length-1])}}if(u&&c){a&&a("tableChange",{type:"11",data:c}),h&&h(c);try{return await Dr({url:`${e}${u}`,method:"post",headers:{Authentication:n,operateContext:o},data:{...c,dataSourceId:(r==null?void 0:r.dataSourceId)||"",pageId:g},signal:((f=window.controller)==null?void 0:f.signal)||""})}catch(p){console.error(p)}}}},kK=(i={})=>{const{indicatorUrl:t=""}=i;return async(n,o)=>{var d;const r={},{search:s}=window==null?void 0:window.location;if(s){const u=s.slice(1,s.length).split("&");for(const c of u){const g=c.split("=");r[g[0]]=g[1]}}const{keyName:l,...a}=o,h={keyName:l};n==="save"&&(h.searchMap=a);try{return await Dr({url:`${t}/userSearch/${n}`,method:"post",headers:{Authentication:r.token||null},data:h,signal:((d=window.controller)==null?void 0:d.signal)||""})}catch(u){console.error(u)}}},LK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r={}}=i;return async(l={})=>{var h,d;const a=AC(i,l);try{const u=await Dr({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)||""});return((d=u==null?void 0:u.data)==null?void 0:d.data)||[]}catch(u){console.error(u)}}},FK={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},relateKeyName:{type:String,default:""},usedDimensionFields:{type:Array,default:[]},allDimensions:{type:Array,default:[]},pageConfig:{type:Object,default:()=>({})},scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})},defaultConfig:{type:Object,defalut:()=>({})},modalContainer:{type:String,default:"#ProviderConfig > #container"}},rb={LAST_DATA:"上期值",SAME_DATA:"同期值",DIFF_DATA:"增减额",MOM_DATA:"环比(%)",YOY_DATA:"同比(%)"},rB=[{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"}],Bs=["合计","平均值","计数","最大值","最小值","方差","标准差"],IK=i=>v.defineAsyncComponent({loader:i,delay:200}),xX="",AX="",DK=v.defineComponent({name:"PivotTable",components:{PivotFilter:BT,PivotProperty:S7,ConditionalProperty:PU,ChartModal:$U,PivotAggregate:KU,PivotTop:qU,PivotConfig:uK,IndSourceList:MK,DragArea:HK,PivotDetail:tK,DrillModal:IK(()=>Promise.resolve().then(()=>qK)),SettingOutlined:w$,DatabaseOutlined:Nj,ArrowsAltOutlined:vj,ShrinkOutlined:R$,FilterOutlined:rM,DeleteOutlined:nM,ClearOutlined:kj},props:{...FK},setup(i,{expose:t,emit:e}){let n=null;const o=v.ref(!1),r=v.ref(""),s=v.ref({}),l=v.ref(),a=v.ref({}),h=v.ref({}),d=v.ref({}),u=v.ref(),c=v.ref({}),g=v.ref(),f=v.ref(),p=v.ref(),m=v.ref(),b=v.ref(),C=v.ref(),_=v.ref(),w=v.ref(),y=v.ref(),S=v.ref(),R=v.ref({}),A=v.ref(!1),x=v.ref({}),T=v.ref({}),M=v.ref({}),B=v.ref(),P=v.ref({}),F=v.ref("200px"),H=v.ref("200px"),E=v.ref(300),L=v.ref({}),I=v.ref(),k=v.ref(i.showLeftTree),D=v.ref(!1),O=v.ref({}),N=v.ref(0),z=v.ref(0),j=v.ref(),$=v.ref(!1),Y=v.ref(),K=v.ref(25),G=v.ref(!0),Q=v.ref({dateFormat:"YYYY-MM-DD"}),dt=v.ref(14),mt=40,St=6,J=10,it=15,yt=20,bt=24,lt=v.ref([]);let ct=`|${Ms(6)}|`;v.provide("splitSymbol",ct),v.provide("indicatorUrl",i.indicatorUrl),v.provide("indicatorToken",i.indicatorToken),v.provide("theme",i.theme),v.provide("pageId",i.pageId),v.provide("context",i.context),v.provide("graphicConfig",i.graphicConfig),v.provide("theDateInfo",Q),v.provide("scaleValue",i.scaleValue),v.provide("getContainer",()=>document.body);const ht=v.ref({}),at=()=>{const V={borderColor:v.unref(pt).borderColor};ht.value=V},wt=v.computed(()=>{let V="#ECF1F5";switch(i.theme){case"default":V="#EAF0F9";break;case"dark":V="#FFFFFF";break}return{borderColor:"#E3E3E3",headerBgColor:V,headerColor:"#252525",bodyBgColor:"#FFFFFF",bodyColor:"#252525",indicatorsHeaderBgColor:V,indicatorsHeaderColor:"#252525",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#252525",aggregateBgColor:V,aggregateColor:"#252525",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"}}),ut=v.ref(1),zt=v.ref();new ResizeObserver(V=>{for(const U of V){const{width:X}=U.contentRect;zt.value=X,ut.value++,v.nextTick(()=>{gB()})}}).observe(document.body);const vt=v.computed(()=>{const{width:V}=i;return V.includes("%")&&ut.value?i.isIframeMode?zt.value:document.querySelector(`#pivotWrap_${i.id}`).clientWidth:parseFloat(V)}),pt=v.computed(()=>{var et;const V={},{styleConfig:U}=i;let X={};(et=Object.keys(U))!=null&&et.length?X=U:X=v.unref(wt);for(const q in X)V[q]=X[q]||"transparent";return V}),ie=v.ref({}),le=()=>{const V=$l();V&&(v.unref(ie).width=V.width+2+"px"),v.unref(ie).backgroundColor=RC(v.unref(pt).headerBgColor,2)};v.watch(()=>i.theme,()=>{n&&(n==null||n.updateOption(ot))});const Qt=()=>{const{widthScale:V,heightScale:U}=i.scaleValue||{};if(V&&U){const X=+(1/V).toFixed(5),et=+(1/U).toFixed(5),q=+(parseFloat(i.width)*V).toFixed(2),tt=+(parseFloat(i.height)*U).toFixed(2);K.value=25*V,R.value={transform:`scale(${X}, ${et})`,width:q+"px",height:tt+"px",left:-(q-parseFloat(i.width))/2+"px",top:-(tt-parseFloat(i.height))/2+"px",paddingLeft:v.unref(K)+"px"},dt.value=16*V,ot.defaultRowHeight=mt*U,ot.theme.scrollStyle.width=St*V,ot.theme.scrollStyle.scrollSliderCornerRadius=J*V,ot.theme.tooltipStyle.fontSize=dt.value,eK(a7,{sortNotActiveColor:v.unref(pt).sortNotActiveColor,sortActiveColor:v.unref(pt).sortActiveColor,iconSize:it*V,hoverSize:yt*V,downSize:bt*V}),v.nextTick(()=>{var Z,ft,xt,Ut,Wt,Ft,Ht,Ie,ci,Mo,Bo,wn;(ft=(Z=v.unref(S))==null?void 0:Z.style)==null||ft.setProperty("--box-tooltip-fontsize",dt.value+"px"),(Ut=(xt=v.unref(S))==null?void 0:xt.style)==null||Ut.setProperty("--box-item-size",K.value+"px"),(Ft=(Wt=v.unref(_))==null?void 0:Wt.style)==null||Ft.setProperty("--menu-item-height",32*U+"px"),(Ie=(Ht=v.unref(_))==null?void 0:Ht.style)==null||Ie.setProperty("--menu-item-padding",`0px ${12*V}px`),(Mo=(ci=v.unref(_))==null?void 0:ci.style)==null||Mo.setProperty("--menu-item-font-size",12*V+"px"),(wn=(Bo=v.unref(_))==null?void 0:Bo.style)==null||wn.setProperty("--menu-item-line-height",30*U+"px"),n&&n.updateOption(ot)})}};v.watch(()=>[i.scaleValue,i.width,i.height],()=>{Qt()},{deep:!0});const we=v.computed(()=>{var V,U,X;return i.fullMode&&!((V=ot.rows)!=null&&V.length)&&!((U=ot.columns)!=null&&U.length)&&!((X=ot.indicators)!=null&&X.length)}),Oe=v.computed(()=>{var V;return{width:(V=i.width)!=null&&V.includes("%")?"calc(100%)":parseFloat(i.width)-v.unref(E)+"px",height:"100%",backgroundColor:i.theme==="darkBlue"?"#081653":"#F1F1F1",color:i.theme==="darkBlue"?"#b2c3dd":""}}),He=v.computed(()=>{const V={fontSize:dt.value+"px"};return v.unref(k)&&(i.theme==="darkBlue"?V.color="#00CCFF":V.color="#416EFF"),V}),kt=v.ref([]),Lt=v.ref([]);v.provide("dimensionFieldList",kt),v.provide("indicatorFieldList",Lt);const Rt="-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",Bt=v.computed(()=>v.unref(kt).filter(V=>V.isInnerFilter).concat(v.unref(Lt).filter(V=>V.isInnerFilter)).sort((V,U)=>V.timeStamp-U.timeStamp));v.watchEffect(()=>{var et,q,tt,Z,ft,xt,Ut,Wt,Ft,Ht;const{dropDownMenuBgColor:V,dropDownMenuColor:U,dropDownMenuHightLightColor:X}=pt.value;V&&((q=(et=v.unref(_))==null?void 0:et.style)==null||q.setProperty("--menu-bg-color",V)),U&&((Z=(tt=v.unref(_))==null?void 0:tt.style)==null||Z.setProperty("--menu-color",U)),X&&((xt=(ft=v.unref(_))==null?void 0:ft.style)==null||xt.setProperty("--menu-hight-light-color",X)),F.value&&((Wt=(Ut=v.unref(_))==null?void 0:Ut.style)==null||Wt.setProperty("--sub-menu-left",F.value)),H.value&&((Ht=(Ft=v.unref(_))==null?void 0:Ft.style)==null||Ht.setProperty("--sub-menu-top",H.value))});const Nt=v.ref([]),ee=v.ref({}),he=v.ref({}),ot=v.reactive({records:[],columnHeaderTitle:!0,excelOptions:{fillHandle:!0},rows:[],columns:[],indicators:[],corner:{titleOnDimension:"row"},dataConfig:{sortRules:[],filterRules:[]},widthMode:"standard",heightMode:"standard",defaultRowHeight:mt,defaultColWidth:360,menu:{renderMode:"html",dropDownMenuHighlight:[]},theme:{cellInnerBorder:!1,underlayBackgroundColor:"transparent",headerStyle:{bgColor(V){return v.unref(Nt).includes(V.dataValue)?v.unref(pt).indicatorsHeaderBgColor:v.unref(pt).headerBgColor},color(V){return v.unref(Nt).includes(V.dataValue)?v.unref(pt).indicatorsHeaderColor:v.unref(pt).headerColor},borderColor:v.unref(pt).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},cornerHeaderStyle:{bgColor(){return v.unref(pt).headerBgColor},color:v.unref(pt).headerColor,borderColor:v.unref(pt).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},bodyStyle:{borderColor:v.unref(pt).borderColor,color(V){var et,q;const U=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return Bs.includes((et=U==null?void 0:U[U.length-1])==null?void 0:et.value)?v.unref(pt).aggregateColor:v.unref(Nt).includes((q=X==null?void 0:X[X.length-1])==null?void 0:q.value)?v.unref(pt).indicatorsBodyColor:v.unref(pt).bodyColor},bgColor(V){var et,q;const U=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return Bs.includes((et=U==null?void 0:U[U.length-1])==null?void 0:et.value)?v.unref(pt).aggregateBgColor:v.unref(Nt).includes((q=X==null?void 0:X[X.length-1])==null?void 0:q.value)?v.unref(pt).indicatorsBodyBgColor:v.unref(pt).bodyBgColor},fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},rowHeaderStyle:{borderColor:v.unref(pt).borderColor,bgColor(V){return Bs.includes(V.dataValue)?v.unref(pt).aggregateBgColor:v.unref(pt).bodyBgColor},color(V){return Bs.includes(V.dataValue)?v.unref(pt).aggregateColor:v.unref(pt).bodyColor},fontFamily(){if(i.isIframeMode)return Rt},fontSize(){return v.unref(dt)}},frameStyle:{borderLineWidth:1,borderColor:v.unref(pt).borderColor},scrollStyle:{width:St,scrollSliderCornerRadius:J},tooltipStyle:{fontSize:v.unref(dt)}}}),Dt=v.computed(()=>{let V=0;return v.unref(k)&&i.fullMode&&(V=v.unref(E)),V}),ue=v.computed(()=>{let V=0;return v.unref(D)&&(V=20),V}),Mt=5,Kt=v.ref({});v.watch(A,V=>{if(V){const U={};v.nextTick(()=>{var q,tt;const X=$l();let et=0;(q=v.unref(Bt))!=null&&q.length&&(et=(tt=v.unref(j))==null?void 0:tt.clientHeight),X&&(U.width=X.width+"px",U.height=X.height+"px",U.top=X.top+et+v.unref(ue)+"px",U.left=X.left+v.unref(Dt)+v.unref(ue)+v.unref(K)+"px"),Kt.value=U})}});const fe=v.ref([]),$e=v.ref([]),Ps=v.ref({}),Gn=v.ref({}),jl=v.ref([]),$h=v.ref([]),Gh=v.ref([]),Uh=v.ref([]),ZK=v.computed(()=>{const V=[];for(const tt of v.unref(fe)){const{data:Z,indicatorKey:ft="",calculateType:xt=""}=tt||{};V.push({label:Z.indicatorKey,columnName:Z.indicatorKey,location:"LEFT",show:!0,calcType:"BUILT_IN",builtInFormula:xt,builtInValueSource:ft})}const U=[],X={};v.unref($e).forEach(tt=>{X[tt.key]||(X[tt.key]=[]),X[tt.key].push(tt)});for(const tt in X){const Z=X[tt]||[];Z.forEach((ft,xt)=>{var Ie;const Ut=v.unref(kt).find(ci=>ci.label===ft.key),Wt=v.unref(Lt).find(ci=>ci.label===ft.key),Ft=Ut||Wt,Ht={};xt<Z.length-1&&(Ht.join="&&"),(Ft==null?void 0:Ft.genericType)==="DATE"&&(Ht.dateFormat=((Ie=v.unref(Q))==null?void 0:Ie.dateFormat)||"YYYY-MM-DD",xt===0?Ht.prop="startTime":xt===1&&(Ht.prop="endTime")),Ft&&U.push({fieldName:Ft.name,fieldType:Ft.genericType,fieldValue:Array.isArray(ft.value)?ft.value.join(","):ft.value,hrpIndexCode:Ft.indexCode,hrpIndexCodeNum:Ft.indexCodeNum,id:Ft.id,label:Ft.label,rule:ft.rule,targetSource:"",typeGuid:ft.typeGuid||"",type:ft.type,...Ht})})}const et=[];if(Object.keys(v.unref(Ps)))for(const tt in v.unref(Ps))v.unref(Ps)[tt]&&et.push({key:tt,num:v.unref(Ps)[tt],rule:"TOP"});const q=[];if(Object.keys(v.unref(Gn)))for(const tt in v.unref(Gn)){const{order:Z,type:ft,columnData:xt,columnHeader:Ut}=v.unref(Gn)[tt];if(Z.toLowerCase()==="default-sort")continue;const Wt={label:tt,order:Z.toUpperCase(),type:"COMBINATION",fieldType:ft};ft==="indicators"&&(Wt.columnHeader=Ut,Wt.columnData=xt,Wt.type="NORMAL"),q.push(Wt)}return{calc:V,filter:U,truncations:et,sorts:q,aggregateMethod:v.unref(P)||{}}}),JK=LK(i),QK=EK(i),lb=kK(i),ab=v.ref({}),ar=async()=>{var xt,Ut,Wt,Ft;const{dimensionList:V,graphicConfig:U={}}=i,{queryColumnList:X=[]}=U,{rows:et=[],columns:q=[]}=ot,tt=(xt=v.unref(Gh))!=null&&xt.length?v.unref(Gh):[],Z=(Ut=v.unref(Uh))!=null&&Ut.length?v.unref(Uh):[];if(!(tt!=null&&tt.length))for(const Ht of et)tt.push(Ht.dimensionKey);if(!(Z!=null&&Z.length))for(const Ht of q)Z.push(Ht.dimensionKey);tt!=null&&tt.length||tt.push(...V.filter(Ht=>Ht.position==="rows").map(Ht=>Ht.key)),Z!=null&&Z.length||Z.push(...V.filter(Ht=>Ht.position==="columns").map(Ht=>Ht.key));const ft=[];for(const Ht in v.unref(a))ft.push({type:"dimension",key:Ht,rule:v.unref(a)[Ht]});for(const Ht in v.unref(h))ft.push({type:"indicators",key:Ht,rule:v.unref(h)[Ht]});if(ft!=null&&ft.length&&hf(ft,{isHandle:!1}),X!=null&&X.length)for(const Ht of X)!tt.includes(Ht.name)&&!Z.includes(Ht.name)&&tt.push(Ht.name);ab.value={...v.unref(ZK),rowDimensionKeys:tt,colDimensionKeys:Z,dimensions:(Wt=v.unref(jl))!=null&&Wt.length?v.unref(jl):v.unref(kt),indicators:(Ft=v.unref($h))!=null&&Ft.length?v.unref($h):v.unref(Lt)};try{const Ht=await QK({pivotTableCal:v.unref(ab)},e,Ie=>{var ci;if(v.unref(G)){const{sqlConditions:Mo=[],queryColumns:Bo=[]}=Ie,wn=lB(Mo),pi=Bo.find(We=>We.typeGuid==="the_date");if(pi&&(Q.value={dateFormat:pi.dateFormat||"YYYY-MM-DD"}),wn!=null&&wn.length)for(const We of wn)["startTime","endTime"].includes(We.prop)&&(v.unref(Q)[We.prop]=We.fieldValue||"",(ci=v.unref(Q))!=null&&ci.rangeFormat||(v.unref(Q).rangeFormat=We.dateFormat||"YYYY-MM-DD"));G.value=!1}});cB(Ht)}catch(Ht){console.error(Ht)}};function lB(V){const U=[];for(const X of V)X.sqlConditions?U.push(...lB(X.sqlConditions)):X.fieldName==="the_date"&&U.push(X);return U}const tY=V=>{v.unref(fe).find(U=>U.data.indicatorKey===V.data.indicatorKey)||fe.value.push(V),ar()},eY=V=>{const U=v.unref(fe).findIndex(X=>X.data.indicatorKey===V);U!==-1&&fe.value.splice(U,1),ar()},hf=(V,{isHandle:U=!0}={})=>{let X=[];Array.isArray(V)?X=V:X=[V];for(const et of X){const{key:q="",rule:tt,type:Z=""}=et||{};let ft=Xe.cloneDeep(tt);Array.isArray(tt)||(ft=[tt]);const xt=v.unref(kt).find(Ft=>Ft.label===q),Ut=v.unref(Lt).find(Ft=>Ft.label===q),Wt=xt||Ut;if(Wt){if((Wt==null?void 0:Wt.genericType)==="DATE"&&(ft==null?void 0:ft.length)===1){const Ft=ft[0].value;ft[0].rule="GREATER_EQUAL",ft[1]={rule:"LESS_EQUAL",value:Ft}}for(let Ft=v.unref($e).length-1;Ft>=0;Ft--){const Ht=v.unref($e)[Ft];Ht.key===q&&Ht.type===Z&&v.unref($e).splice(Ft,1)}for(const Ft of ft){const{rule:Ht,value:Ie}=Ft;q&&Ht&&Ie&&$e.value.push({key:q,rule:Ht,value:Ie,type:Z,typeGuid:Wt.typeGuid})}}}U&&ar()},iY=()=>{Ps.value=v.unref(x)||{},ar()},aB=V=>{const{key:U,order:X,type:et,columnData:q=[]}=V;if(et==="indicators"){let tt="";for(const Z in v.unref(Gn))v.unref(Gn)[Z].type==="indicators"&&(tt=Z);tt&&delete v.unref(Gn)[tt]}v.unref(Gn)[U]={order:X,type:et,columnData:q},ar()},Kh=()=>{const V=v.unref(kt),U=v.unref(Lt),X=V.filter(q=>q.positionType==="rows").map(q=>q.name),et=V.filter(q=>q.positionType==="columns").map(q=>q.name);jl.value=Xe.cloneDeep(V),$h.value=Xe.cloneDeep(U),Gh.value=Xe.cloneDeep(X),Uh.value=Xe.cloneDeep(et),ar()};function nY(V,U=!0,X=-1){if(X>-1)ot.indicators.splice(X,0,...V);else for(const et of V)ot.indicators.push(et);U&&n.updateOption(ot)}function oY({label:V,calcType:U}){const X=[],et=v.unref(he)[V]||[];for(const q in rb)et.indexOf(q)===-1&&X.push({text:rb[q],menuKey:q});return U==="FORMULA"||!(X!=null&&X.length)?rB:[{text:"计算",menuKey:"calculate",children:X},...rB]}function df(V){var X;let U=[];return V==="rows"?U=[{text:"钻取",menuKey:"drill"}]:U=[{text:"钻取",menuKey:"drill"},{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"筛选",menuKey:"filter"},{text:"聚合",menuKey:"aggregate"},{text:"取top",menuKey:"top"},{text:"删除",menuKey:"delete"}],i.fullMode||i.allowDrill?v.unref(lt)&&Array.isArray(v.unref(lt))&&(X=v.unref(lt))!=null&&X.length?U[0].children=v.unref(lt).map(et=>({text:et.title||et.label,menuKey:V==="rows"?`${ct}${et.label}`:et.label})):U.splice(0,1):(U.splice(0,1),U.splice(-1,1)),U}function rY(V,U){A.value=!0,v.unref(P)[U]=V||[],ar(),e("tableChange",{type:"9",data:{key:U,types:V}})}function sY(V,U=!0){var X;for(const et of V){const{key:q,name:tt,type:Z,dimensionKey:ft,width:xt}=et;let Ut;if(ft)Ut=et;else{const Wt={dimensionKey:q,title:tt,width:xt?`${xt}%`:"auto",type:Z};Z==="columns"?Wt.headerStyle={textStick:!0}:Z==="rows"&&(Wt.cornerHeaderIcon="sortNormal"),Wt.headerFormat=Ft=>{if(Z==="rows"){const Ht=Ft==null?void 0:Ft.split(ct);return Ht!=null&&Ht.length?Ht[Ht.length-1]:Ft}else return Ft},Ut=Wt}if(Ut&&(Ut.headerStyle={textStick:!0},ot[Z].push(Ut)),(X=ot[Z])!=null&&X.length)for(const Wt of ot[Z])Wt.cornerDropDownMenu=df(),Z==="rows"&&(Wt.dropDownMenu=df("rows"));ot.dataConfig.sortRules.push({sortField:q,sortType:v.unref(r)})}U&&n.updateOption(ot),v.nextTick(()=>{dB()})}function hB(V){const U={},{records:X}=ot;for(const et of X)for(const q of V)xn(U,q)?U[q].find(tt=>tt.value===et[q])||U[q].push(hb({value:et[q]})):U[q]=hb([{value:et[q]}]);return U}function hb(V){const U=Xe.cloneDeep(V);if(typeof V=="object")if(Array.isArray(U))for(const et of U)X(et);else X(U);function X(et){for(const q in et)if(typeof et[q]=="string"){const tt=et[q].split(ct);tt!=null&&tt.length&&(et[q]=tt[tt.length-1])}}return U}function dB(){const{dataset:{columns:V,rows:U}}=n,X=U.concat(V);s.value=hB(X)}const uB=v.computed(()=>{var V;return(V=v.unref(kt))!=null&&V.length?v.unref(kt).map(U=>U.label).concat(i.usedDimensionFields):i.usedDimensionFields});async function cB(V){var Ie,ci,Mo,Bo,wn,pi,We,hr;const U=await JK({pivotTableCal:v.unref(ab)});lt.value=U.filter(jt=>!v.unref(uB).includes(jt.label));let X=V;V?Y.value=Xe.cloneDeep(V):X=Xe.cloneDeep(v.unref(Y)),A.value=!0;const{data:et={}}=(X==null?void 0:X.data)||{},{rows:q=[]}=et,tt=[],Z=[];for(const jt of v.unref(kt)){if(!jt.show)continue;const se=ot[jt.positionType].find(Ze=>Ze.dimensionKey===jt.label);se?Z.push({...se,title:jt.showTitle}):Z.push({key:jt.label,name:jt.showTitle,type:jt.positionType,width:jt.width})}for(let jt=0;jt<v.unref(Lt).length;jt++){const se=v.unref(Lt)[jt];if(!se.show)continue;const Ze=oY(se),Ge=ot.indicators.find(Li=>Li.indicatorKey===se.label);let Ue={};Ge?Ue={...Ge,dropDownMenu:Ze,title:se.showTitle}:Ue={indicatorKey:se.label,title:se.showTitle,width:se!=null&&se.width?`${se.width}%`:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},dropDownMenu:Ze,format:(Li,Sn,Yh,Xh)=>{const cb=Xh.getRecordByCell(Sn,Yh)||[];return cb[0]&&isNaN(+cb[0][se.label])?cb[0][se.label]:Li||"-"}},Ue&&(Ue.style={padding:[16,28,16,28],textAlign:"right"},tt.push(Ue))}const ft=Z.filter(jt=>jt.type==="rows");if(((Ie=ot==null?void 0:ot.rows)==null?void 0:Ie.length)!==ft.length&&typeof((ci=v.unref(B))==null?void 0:ci.col)=="number"&&(v.unref(B).col+=ft.length-(((Mo=ot==null?void 0:ot.rows)==null?void 0:Mo.length)||0)),ot.indicators=[],ot.rows=[],ot.columns=[],(Bo=v.unref(fe))!=null&&Bo.length)for(const jt of v.unref(fe))isNaN(+jt.position)||tt.splice(+jt.position,0,{...jt.data,calculateType:jt.calculateType});const{sortType:xt,col:Ut,row:Wt}=v.unref(B)||{};for(const jt of tt)jt&&(jt.headerIcon=se=>{const{col:Ze,row:Ge}=se;if(Ut===Ze&&Wt===Ge){let Ue="sortNormal";return xt==="ASC"?Ue="sortUp":xt==="DESC"&&(Ue="sortDown"),Ue}else return"sortNormal"});nY(tt,!1),sY(Z,!1);const Ft=[],Ht=Z.filter(jt=>jt.type==="rows").map(jt=>jt.key||jt.dimensionKey);for(const jt of q)for(const se in jt)if(!Bs.includes(jt[se])){const Ze=Ht.indexOf(se);if(Ze!==-1){const Ge=[];for(let Ue=0;Ue<=Ze;Ue++){const Li=String(jt[Ht[Ue]]);if(Li.includes(ct)){const Sn=Li.split(ct);Sn!=null&&Sn.length&&Ge.push(Sn[Sn.length-1])}else Ge.push(Li)}Ge!=null&&Ge.length&&(jt[se]=Ge.join(ct))}}for(const jt of Z){const se=(jt==null?void 0:jt.key)||(jt==null?void 0:jt.dimensionKey);if(jt.type==="columns"&&!v.unref(M)[se])v.unref(M)[se]=db("",se,q);else if(jt.type==="rows")if(v.unref(T)[se]){const{type:Ze}=v.unref(T)[se]||{};Ft.push(db(Ze,se,q))}else if(!v.unref(B)||v.unref(B).sortField===se||!n)Ft.push(db("",se,q));else{const Ze=ot.dataConfig.sortRules.find(Ge=>Ge.sortField===se);Ze&&Ft.push(Ze)}}if(v.unref(B)&&Ft.push(v.unref(B)),(wn=Object.keys(v.unref(M)))!=null&&wn.length)for(const jt in v.unref(M))Ft.push(v.unref(M)[jt]);if(ot.records=q,ot.dataConfig.sortRules=Ft,q!=null&&q.length&&(v.unref(O).records=[]),(pi=ot.columns)!=null&&pi.length?ot.columnHeaderTitle=!0:(We=ot.indicators)!=null&&We.length?ot.columnHeaderTitle=!1:(hr=ot.rows)!=null&&hr.length&&(ot.columnHeaderTitle=!0),n)n.updateOption(ot),v.nextTick(()=>{fB()}),A.value=!1;else{const jt=document.getElementById(`pivotTableContainer_${i.id}`);n=new AT(jt,ot),v.nextTick(()=>{fB(),o.value=!0,A.value=!1,i.isIframeMode&&(v.unref(N)&&n.setScrollTop(v.unref(N)),v.unref(z)&&n.setScrollLeft(v.unref(z)))}),vY()}v.nextTick(()=>{const{indexFormatConfig:jt}=(i==null?void 0:i.defaultConfig)||{};if(jt){const se=[];for(const Ze in jt)jt[Ze]&&se.push(jt[Ze]);CB(se)}})}const Hs=v.ref({});function gB(){$l()&&(v.unref(D)?(v.unref(Hs).top=v.unref(ue)+"px",v.unref(Hs).left="0"):(v.unref(Hs).top="0",v.unref(Hs).left="0"))}function fB(){var V;if(n&&!((V=ot.records)!=null&&V.length)){const{dataset:{rows:U}}=n,X={};for(const et of U)X[et]="";v.unref(O).dataConfig={...ot.dataConfig,filterRules:[]},v.unref(O).records=[X],n.updateOption({...ot,...v.unref(O)})}}function lY(V,U){A.value=!0,hf({type:"indicators",key:V,rule:U}),e("tableChange",{type:"3",data:{type:"indicators",key:V,rule:U}})}function aY(V,U){A.value=!0,hf({type:"dimension",key:V,rule:U}),e("tableChange",{type:"3",data:{type:"dimension",key:V,rule:U}})}function hY(V,U){var tt;let X=!1;const et=ot[U].findIndex(Z=>Z.dimensionKey===V),q=ot.dataConfig.sortRules.findIndex(Z=>Z.sortField===V);if(et!==-1){if(ot[U].splice(et,1),i.fullMode||i.allowDrill){const Z=v.unref(kt).findIndex(ft=>ft.label===V);Z!==-1&&(v.unref(kt)[Z].isInnerFilter?(v.unref(kt)[Z].show=!1,X=!0):v.unref(kt).splice(Z,1))}else for(const Z of ot[U])Z.cornerDropDownMenu=df(),U==="rows"&&(Z.dropDownMenu=df("rows"));(tt=v.unref(B))!=null&&tt.col&&(v.unref(B).col-=1),A.value=!0,Kh(),e("tableChange",{type:"7"})}q!==-1&&(ot.dataConfig.sortRules[q].sortType=r),n.updateOption(ot),v.nextTick(()=>{if(dB(),!X){delete a.value[V];const Z=v.unref($e).findIndex(ft=>ft.key===V);Z!==-1&&v.unref($e).splice(Z,1)}})}function dY(V){const{indicators:U}=ot,X=U.findIndex(et=>et.indicatorKey===V);if(X!==-1){const et=U[X];if(U.splice(X,1),et.calculateType){const q=et.indicatorKey.split("@"+et.calculateType)[0],tt=v.unref(he)[q].indexOf(et.calculateType);tt!==-1&&v.unref(he)[q].splice(tt,1);const Z=v.unref(Nt).indexOf(et.title);Z!==-1&&v.unref(Nt).splice(Z,1),delete v.unref(ee)[et.title]}eY(et.indicatorKey),e("tableChange",{type:"2",data:et.indicatorKey})}}function db(V,U,X){let et=[];const q=new Set;for(const tt of X){const Z=tt[U];Z&&!Bs.includes(Z)&&q.add(Z)}return et=Array.from(q),V==="asc"?et=et.sort((tt,Z)=>tt.localeCompare(Z)):V==="desc"&&(et=et.sort((tt,Z)=>Z.localeCompare(tt))),{sortField:U,sortBy:[...et,...Bs]}}function pB(V,U,X,et){A.value=!0;let{menu:{dropDownMenuHighlight:q},rows:tt}=ot;et=et+1,q=q.filter(ft=>!(ft.type==="dimension"&&ft.field===U)||ft.type==="indicator"),q.push({col:X,row:et-1,field:U,type:"dimension",menuKey:V}),ot.menu.dropDownMenuHighlight=q;const Z=tt.find(ft=>ft.dimensionKey===U);if(Z){let ft="sortNormal";V==="asc"?ft="sortUp":V==="desc"&&(ft="sortDown"),Z.cornerHeaderIcon=ft}n.updateOption(ot),V==="default-sort"?delete v.unref(T)[U]:v.unref(T)[U]={type:V},aB({key:U,order:V,type:"dimension"}),e("tableChange",{type:"4",data:{key:U,order:V,type:"dimension"}})}function mB(V,U,X,et,q){var Ht;A.value=!0;const{menu:tt}=ot;let Z=tt.dropDownMenuHighlight,ft="";(Ht=ot.rows)!=null&&Ht.length&&(ft=ot.rows[ot.rows.length-1].dimensionKey);const xt=X.filter((Ie,ci)=>ci<X.length-1),Ut=xt.map(Ie=>({columnName:Ie.dimensionKey})),Wt=xt.map(Ie=>Ie.value),Ft=Z.findIndex(Ie=>Ie.field===ft&&Ie.type==="dimension");Ft!==-1&&Z.splice(Ft,1),Z=Z.filter(Ie=>Ie.type==="dimension"),Z.push({col:et,row:q,field:U,type:"indicator",menuKey:V}),ot.menu.dropDownMenuHighlight=Z,n.updateOption(ot),V==="default-sort"?B.value=null:B.value={sortField:ft,sortByIndicator:U,sortType:V.toUpperCase(),query:Wt,col:et,row:q},aB({key:U,order:V,type:"indicators",columnData:Wt,columnHeader:Ut}),e("tableChange",{type:"4",data:{key:U,order:V,type:"indicators"}})}function vB({dimensionKey:V,value:U=""}){const X={};v.unref(a)[V]&&(X.filterData=v.unref(a)[V]);const et=v.unref(kt).find(q=>q.label===V);d.value={tableInstance:n,fieldName:U||(et==null?void 0:et.title)||V,key:V,type:"dimension",...X},v.nextTick(()=>{v.unref(u).showModal(),e("tableChange",{type:"5",data:V})})}function uY(V,U){d.value={tableInstance:n,fieldName:U,key:V,type:"indicators",filterData:v.unref(h)[V]},v.nextTick(()=>{v.unref(u).showModal()})}function cY({indicatorKey:V,menuKey:U}){A.value=!0;let X=ot.indicators.length-1;const et=`${V}@${U}`,q=`${V}(${rb[U]}) fx`;v.unref(Nt).push(q),v.unref(ee)[q]=et,ot.indicators.forEach((tt,Z)=>{tt.indicatorKey===V&&(X=Z+1)}),v.unref(he)[V]||(v.unref(he)[V]=[]),v.unref(he)[V].push(U),tY({data:{indicatorKey:et,title:q,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],textAlign:"right"},format:(tt,Z,ft,xt)=>{const Ut=xt.getRecordByCell(Z,ft)||[];return Ut[0]&&isNaN(+Ut[0][et])?Ut[0][et]:tt}},position:X,indicatorKey:V,calculateType:U}),e("tableChange",{type:"1",data:{indicatorKey:V,calculateType:U}})}function gY(){const V=ot.rows[0]?ot.rows[0].cornerDropDownMenu:[],U=ot.columns[0]?ot.columns[0].cornerDropDownMenu:[],X=ot.rows.map(Z=>({...Z,cornerDropDownMenu:U})),et=ot.columns.map(Z=>({...Z,cornerDropDownMenu:V}));ot.columns=X,ot.rows=et;const{type:q,len:tt}=ot.aggregate||{};q&&(ot.records.splice(-tt),ot.aggregate={type:q,len:0}),ot.menu.dropDownMenuHighlight=[],a.value={},h.value={},c.value={},ot.dataConfig.filterRules=[],n.updateOption(ot)}function fY({indicatorKey:V,fieldName:U}){const X=uf(V);if(X>-1){const et=ot.indicators[X].formatConfig||{};v.unref(g).showModal({...et,indicatorKey:V,fieldName:U})}}function pY(V){const U=uf(V);if(U>-1){const X=ot.indicators[U].conditionalConfig||[];v.unref(f).showModal(V,X)}}function uf(V){return ot.indicators.findIndex(U=>U.indicatorKey===V)}function mY(V){const U=v.unref(kt)[0],X=v.unref(kt).map(tt=>tt.label),et=hB(X),q={xLabel:U.label,yLabel:V,dimensionData:et,records:hb(ot.records)};v.unref(C).showModal(q)}function vY(){n.on("scroll",V=>{const{scrollDirection:U}=V;U==="vertical"?N.value=n.getScrollTop():U==="horizontal"&&(z.value=n.getScrollLeft())}),n.on("dblclick_cell",V=>{const{cellLocation:U="",field:X=""}=V;U==="body"&&!X.includes("LAST_DATA")&&!X.includes("SAME_DATA")&&!X.includes("DIFF_DATA")&&!X.includes("MOM_DATA")&&!X.includes("YOY_DATA")&&v.unref(w).showModal({args:V,splitSymbol:ct,dimension:v.unref(kt),indicator:v.unref(Lt)})}),n.on("after_render",()=>{at(),gB(),le(),v.nextTick(()=>{o.value=!0})}),n.on("icon_click",V=>{const{name:U,col:X,row:et}=V;if(["sortNormal","sortUp","sortDown"].includes(U)){const{rows:q,indicators:tt}=ot,Z=n.getCellValue(X,et);let ft=v.unref(kt).find(Ht=>Ht.showTitle===Z);ft||(ft=v.unref(Lt).find(Ht=>Ht.showTitle===Z));let xt=ft==null?void 0:ft.label;if(v.unref(Nt).includes(Z)&&(xt=v.unref(ee)[Z]),!xt)return;const Ut=q.find(Ht=>Ht.dimensionKey===xt),Wt=tt.find(Ht=>Ht.indicatorKey===xt);let Ft="default-sort";if(U==="sortUp"?Ft="desc":U==="sortDown"?Ft="default-sort":(!U||U==="sortNormal")&&(Ft="asc"),Wt){const Ht=n.getCellHeaderPaths(X,et);mB(Ft,xt,(Ht==null?void 0:Ht.colHeaderPaths)||[],X,et)}else Ut&&pB(Ft,xt,X,et)}}),n.on("show_menu",()=>{const V=document.querySelector(`#pivotTableContainer_${i.id} .vtable__menu-element`);if(V){V.classList.add("first");const U=parseFloat(V.style.left)+V.clientWidth+3;F.value=U+"px",H.value=parseFloat(V.style.top)+"px"}}),n.on("dropdown_menu_click",V=>{const{field:U,col:X,row:et}=V,{dimensionKey:q,indicatorKey:tt,value:Z}=U[U.length-1];let ft=V.menuKey,xt=!1;ft.includes(ct)&&(xt=!0,ft=ft.replace(ct,"")),l.value=V;const Ut=v.unref(lt).find(Wt=>Wt.label===ft);if(Ut){const Wt=v.unref(kt).findIndex(Ft=>Ft.label===q);if(Wt!==-1){const Ft={...Ut,show:!0,positionType:"rows",showTitle:Ut.title||Ut.label};xt?v.unref(y).showModal({drillDimension:Ft,drillFieldData:U,usedDimensionFields:v.unref(uB),tableProps:i}):(kt.value.splice(Wt+1,0,Ft),A.value=!0,Kh()),e("tableChange",{type:"8"})}}switch(ft){case"drill":alert("无维度可钻取");break;case"delete":q?hY(q,"rows"):tt&&dY(tt);break;case"asc":case"desc":case"default-sort":q?pB(ft,q,X,et):tt&&mB(ft,tt,U,X,et);break;case"filter":q?vB({dimensionKey:q}):tt&&uY(tt,Z);break;case"LAST_DATA":case"SAME_DATA":case"DIFF_DATA":case"MOM_DATA":case"YOY_DATA":case"zb":cY({indicatorKey:tt,menuKey:ft});break;case"trans":gY();break;case"property":fY({indicatorKey:tt,fieldName:Z});break;case"conditionalProperty":pY(tt);break;case"aggregate":v.unref(p).showModal(v.unref(P)[q]||[],q);break;case"top":bY(q);break;case"graph":mY(tt);break}})}function bY(V){v.unref(m).showModal({value:v.unref(x)[V]||"",key:V})}function CY(){v.unref(b).showModal(v.unref(kt),v.unref(Lt))}async function yY(){A.value=!0,await lb("save",{keyName:i.relateKeyName||i.keyName,data:[]}),a.value={},h.value={},c.value={},ot.dataConfig.filterRules=[],$e.value=[],ar()}function _Y(V=[],U=[]){var tt;const X=V.concat(U).map(Z=>Z.name),et=v.unref(kt).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1})),q=v.unref(Lt).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1}));kt.value=[...V,...et],Lt.value=[...U,...q];for(const Z in v.unref(Gn))if(((tt=v.unref(Gn)[Z])==null?void 0:tt.type)==="indicators"){delete v.unref(Gn)[Z];break}i.fullMode||i.allowDrill?(T.value={},B.value={},M.value={},A.value=!0,Kh(),e("tableChange",{type:"10",data:{dimensions:v.unref(kt),indicators:v.unref(Lt)}})):cB()}function wY(V){if(!v.unref(I))return;const{name:U,scope:X}=v.unref(I),et=v.unref(kt).find(xt=>xt.name===U),q=v.unref(kt).findIndex(xt=>xt.name===U),tt=v.unref(Lt).find(xt=>xt.name===U),Z=v.unref(Lt).findIndex(xt=>xt.name===U),ft={timeStamp:new Date().getTime()};if(["rows","columns"].includes(V))if(et)if(et.show){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else et.positionType=V,et.show=!0,v.unref(kt).push(et),v.unref(kt).splice(q,1);else v.unref(kt).push({...Xe.cloneDeep(v.unref(I)),...ft,positionType:V,showTitle:v.unref(I).label});else if(V==="indicators")if(tt)if(tt.show){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else tt.show=!0,v.unref(Lt).push(tt),v.unref(Lt).splice(Z,1);else v.unref(Lt).push({...Xe.cloneDeep(v.unref(I)),...ft,showTitle:v.unref(I).label});else if(V==="filters"){if(["IDX","BUILT_IN_IDX"].includes(X))if(v.unref(Bt).find(xt=>xt.name===U)){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else tt?(tt.isInnerFilter=!0,tt.timeStamp=new Date().getTime()):v.unref(Lt).push({...Xe.cloneDeep(v.unref(I)),showTitle:v.unref(I).label,show:!1,isInnerFilter:!0,...ft});else if(["DIM","BUILT_IN_DIM"].includes(X))if(v.unref(Bt).find(xt=>xt.name===U)){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else et?(et.isInnerFilter=!0,et.timeStamp=new Date().getTime()):v.unref(kt).push({...Xe.cloneDeep(v.unref(I)),positionType:"filters",showTitle:v.unref(I).label,show:!1,isInnerFilter:!0,...ft})}A.value=!0,I.value=null,Kh(),e("tableChange",{type:"10",data:{dimensions:v.unref(kt),indicators:v.unref(Lt)}})}const SY=(V=[])=>{let U=!1;for(const X of v.unref(kt))if(!V.find(q=>q.typeGuid===X.typeGuid)){U=!0;break}return U};v.provide("setItemDisabled",SY);const bB=()=>{},xY=({checkKeys:V,key:U,type:X})=>{X==="dimension"?(a.value[U]=V,c.value={},aY(U,V)):X==="indicators"&&(h.value[U]=V,lY(U,V));const et=[];for(const q in v.unref(a))et.push({key:q,data:v.unref(a)[q],type:"dimension"});for(const q in v.unref(h))et.push({key:q,data:v.unref(h)[q],type:"indicators"});lb("save",{keyName:i.relateKeyName||i.keyName,data:et})};function CB(V){let U=V;Array.isArray(U)||(U=[V]);for(const X of U){const{indicatorKey:et,unit:q="",format:tt,floatLength:Z,position:ft}=X,xt=uf(et);if(xt>-1){const Ut=ot.indicators[xt];Ut.formatConfig=X,Ut.format=(Wt,Ft,Ht,Ie)=>{const ci=Ie.getRecordByCell(Ft,Ht)||[];return ci[0]&&isNaN(+ci[0][Ut.indicatorKey])?ci[0][Ut.indicatorKey]:(tt==="integer"?Wt=Math.round(Number(Wt)):tt==="float"&&!isNaN(Z)?Wt=Number(Wt).toFixed(Z):tt==="percent"&&(Z?Wt=(Number(Wt)*100).toFixed(Z)+"%":Wt=Number(Wt)*100+"%"),ft==="right"?Wt+q:q+Wt)}}}n.updateOption(ot)}function AY(V,U=[]){const X=uf(V);if(X>-1){const et=ot.indicators[X];et.conditionalConfig=U;const q=[];U.forEach(tt=>{let Z="";tt.conditions.forEach((ft,xt)=>{xt>0&&(Z+=ft.join==="and"?" && ":" || "),Z+=`value${ft.operation}${ft.value}`}),q.push(Z)}),et.style.color=({dataValue:tt})=>{let Z="#333";return U.forEach((ft,xt)=>{ft.color&&(Z=ub(q[xt],tt)?ft.color:Z)}),Z},et.style.textAlign=({dataValue:tt})=>{let Z="left";return U.forEach((ft,xt)=>{ft.align&&(Z=ub(q[xt],tt)?ft.align:Z)}),Z},et.customRender=({rect:tt,dataValue:Z})=>{let ft=[];return U.forEach((xt,Ut)=>{if(xt.icon&&ub(q[Ut],Z)){const Ft=F2(xt.icon,xt.iconColor);ft=[{type:"icon",x:xt.align!=="right"?15:tt.width-25,y:tt.height/2-7,svg:Ft,height:14,width:14}]}}),{elements:ft,renderDefault:!0}},n.updateOption(ot)}}function ub(V,U){V=V||"true";const X=`function (value){
|
|
368
368
|
if(${V}){
|
|
369
369
|
return true
|
|
370
370
|
}else{
|
|
371
371
|
return false
|
|
372
372
|
}
|
|
373
|
-
}`;return Function(`"use strict";return (${X})`)().call(this,U)}function RY(V){A.value=!0;const{value:U,key:X}=V;v.unref(x)[X]=U,iY(),e("tableChange",{type:"6",data:{key:X,value:U}})}function $l(){return n==null?void 0:n.getDrawRange()}const cf=v.ref([]),yB=v.ref(""),_B=v.ref(),TY=(V,U)=>{var Ie,ci,Mo,Bo,wn;const X=U.dataViewColumns[V.oldIndex]||{},{scope:et}=X;let q=!1,tt=!1;["IDX","BUILT_IN_IDX"].includes(et)?q=!0:["DIM","BUILT_IN_DIM"].includes(et)&&(tt=!0);const Z=$l(),{rows:ft,columns:xt,indicators:Ut,records:Wt}=ot,{top:Ft,left:Ht}=Z;if(v.unref(we)){let pi=i.height;i.isIframeMode&&(pi=document.body.clientHeight+"px");let We=v.unref(Oe).width;We.includes("calc")&&(We=v.unref(vt)-v.unref(E)+"px"),L.value.main={width:We,height:pi,top:Ft+v.unref(ue)+"px",left:Ht+v.unref(Dt)+v.unref(ue)+v.unref(K)+"px"},L.value.rows={width:parseFloat(We)/2-Mt*2+"px",height:parseFloat(pi)-Mt*2+"px",top:0,left:0},L.value.columns={width:parseFloat(We)/2-Mt*2+"px",height:parseFloat(pi)/3-Mt*2+"px",top:0,left:parseFloat(We)/2+"px"},L.value.indicators={width:parseFloat(We)/2-Mt*2+"px",height:parseFloat(pi)*2/3-Mt*2+"px",top:parseFloat(pi)/3+"px",left:parseFloat(We)/2+"px"}}else{let pi=50;(Ie=v.unref(Bt))!=null&&Ie.length?pi=v.unref(j).clientHeight:tt&&($.value=!0,v.unref(ie).height=pi+"px");let We=0,hr=1;const jt=n.getRowHeight(0),se={columnHeaderTitle:!0};if(xt!=null&&xt.length?hr+=xt.length:se.columns=[{dimensionKey:Ms(6),title:"",width:"100px",type:"columns"}],ft!=null&&ft.length?ft.forEach((Ze,Ge)=>{We+=n.getColWidth(Ge)}):(We=100,se.rows=[{dimensionKey:Ms(6),title:"",width:"100px",type:"rows"}]),Ut!=null&&Ut.length||(se.indicators=[{indicatorKey:Ms(6),title:"",width:"20%",format:()=>""}]),(ci=Object.keys(se))!=null&&ci.length){const{rows:Ze=[],columns:Ge=[]}=se;let Ue=[];Wt!=null&&Wt.length?Ue=Xe.cloneDeep(Wt):(Bo=(Mo=v.unref(O))==null?void 0:Mo.records)!=null&&Bo.length&&(Ue=Xe.cloneDeep((wn=v.unref(O))==null?void 0:wn.records));let Li=xt.map(Sn=>Sn.dimensionKey);if(!(Li!=null&&Li.length)&&(Ge!=null&&Ge.length)&&(Li=[Ge[0].dimensionKey]),Ue!=null&&Ue.length)for(const Sn of Ue){for(const Xh of Ze)Sn[Xh.dimensionKey]="";let Yh=!1;for(const Xh in Sn)if(Li.includes(Xh)){Yh=!0;break}tt?Yh||(hr=2,Sn[Li[0]]=""):q&&(Yh||(hr=1))}n.updateOption({...ot,...se,records:Ue})}v.nextTick(()=>{var Li;const Ze=$l(),Ge=Ze.width,Ue=Ze.height;L.value.main={width:Ge+"px",height:Ue+pi+"px",top:Ft+v.unref(ue)+"px",left:Ht+v.unref(Dt)+v.unref(ue)+v.unref(K)+"px"},L.value.rows={width:We-Mt*2+"px",height:Ue-Mt*2+"px",top:pi+"px",left:0},L.value.columns={width:Ge-We-Mt*2+"px",height:hr*jt-Mt*2+"px",top:pi+"px",left:We+"px"},L.value.indicators={width:Ge-We-Mt*2+"px",height:Ue-hr*jt-Mt*2+"px",top:hr*jt+((Li=v.unref(Bt))!=null&&Li.length?pi:0)+"px",left:We+"px"},L.value.filters={width:Ge-Mt*2+"px",height:pi-Mt*2+"px",top:0,left:0}})}I.value=X,q?cf.value=[0,1]:tt&&(cf.value=[2])},MY=()=>{var V;(V=v.unref(O).records)!=null&&V.length?n.updateOption({...ot,records:v.unref(O).records}):n.updateOption(ot),$.value=!1,v.unref(ie).height="",cf.value=[]},BY=()=>{var V;(V=v.unref(_B))==null||V.handleSearch(v.unref(yB))},PY=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:x.value,sortData:T.value,colSortData:M.value,indSortData:B.value,aggregateMap:P.value,subMenuLeft:F.value,subMenuTop:H.value,dragAreaStyle:L.value,showTreeData:k.value,largeVisible:D.value,temporaryData:O.value,splitSymbol:ct,sourceListStyle:ht.value,dimensionFieldList:kt.value,indicatorFieldList:Lt.value,computedIndKeys:Nt.value,computedIndMap:ee.value,computedIndFieldMap:he.value,option:ot,loadingRect:Kt.value,calculateList:fe.value,filterList:$e.value,topNumMap:Ps.value,sortMap:Gn.value,customDimensions:jl.value,customIndicators:$h.value,customRowKeys:Gh.value,customColKeys:Uh.value,cacheResData:Y.value,toolBoxStyle:Hs.value,scrollTop:N.value,scrollLeft:z.value}));v.watch(PY,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});const wB=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,x.value=V.topNumData,T.value=V.sortData,M.value=V.colSortData,B.value=V.indSortData,P.value=V.aggregateMap,F.value=V.subMenuLeft,H.value=V.subMenuTop,L.value=V.dragAreaStyle,k.value=V.showTreeData,D.value=V.largeVisible,O.value=V.temporaryData,ct=V.splitSymbol,ht.value=V.sourceListStyle,kt.value=V.dimensionFieldList,Lt.value=V.indicatorFieldList,Nt.value=V.computedIndKeys,ee.value=V.computedIndMap,he.value=V.computedIndFieldMap,Kt.value=V.loadingRect,fe.value=V.calculateList,$e.value=V.filterList,Ps.value=V.topNumMap,Gn.value=V.sortMap,jl.value=V.customDimensions,$h.value=V.customIndicators,Gh.value=V.customRowKeys,Uh.value=V.customColKeys,Y.value=V.cacheResData,Hs.value=V.toolBoxStyle,N.value=V.scrollTop,z.value=V.scrollLeft,Object.assign(ot,V.option)};async function HY(V){var et,q;A.value=!0,V&&wB(V);const U=await lb("get",{keyName:i.relateKeyName||i.keyName}),X=((q=(et=U==null?void 0:U.data)==null?void 0:et.data)==null?void 0:q.searchMap)||{};if(X!=null&&X.data){v.unref(a)||(a.value={}),v.unref(h)||(h.value={});const tt=[];for(const Z of X.data)Z.type==="dimension"?a.value[Z.key]=Z.data:Z.type==="indicators"&&(h.value[Z.key]=Z.data),tt.push({type:Z.type,key:Z.key,rule:Z.data});tt!=null&&tt.length&&hf(tt,{isHandle:!1})}ar()}function EY(){return{dimensions:v.unref(kt),indicators:v.unref(Lt)}}const kY=V=>{const{scope:U,name:X,label:et}=V;let q=[];["IDX","BUILT_IN_IDX"].includes(U)?q=v.unref(Lt):["DIM","BUILT_IN_DIM"].includes(U)&&(q=v.unref(kt));const tt=q.findIndex(Z=>Z.name===X);if(tt!==-1){delete v.unref(a)[q[tt].label];const Z=v.unref($e).findIndex(ft=>ft.key===et);Z!==-1&&v.unref($e).splice(Z,1),q[tt].show?q[tt].isInnerFilter=!1:q.splice(tt,1)}A.value=!0,Kh(),e("tableChange",{type:"10",data:{dimensions:v.unref(kt),indicators:v.unref(Lt)}})},LY=V=>{const{scope:U,label:X,showTitle:et}=V,q=j2(U);q==="indicator"||q==="dimension"&&vB({dimensionKey:X,value:et})};t({option:ot,refreshData:HY,reRenderTable:wB,click:bB,getDrawRange:$l,getSaveData:EY}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],([V,U,X])=>{const{queryColumnList:et=[],indicators:q=[]}=V,tt=Xe.cloneDeep(et),Z=Xe.cloneDeep(q);for(const ft of tt){const xt=U.find(Ut=>Ut.key===ft.name);ft.positionType=(xt==null?void 0:xt.position)||"rows",ft.width=xt==null?void 0:xt.width,ft.showTitle=ft.title||ft.label}for(const ft of Z){const xt=X.find(Ut=>Ut.key===ft.name);ft.width=xt==null?void 0:xt.width,ft.showTitle=ft.label}kt.value=tt,Lt.value=Z},{immediate:!0,deep:!0});const FY=()=>{o.value=!1,k.value=!k.value},IY=()=>{o.value=!1,D.value=!D.value,window.enScale&&window.enScale(v.unref(D))},DY=V=>{const U=v.unref(kt).find(tt=>tt.label===V),X=v.unref(Lt).find(tt=>tt.label===V),et=U||X,q=v.unref(a)[V];return q?et.genericType==="DATE"?Array.isArray(q)?`${q[0].value}~${q[1].value}`:q.value:q.value&&Array.isArray(q.value)?q.value.join("、"):"":""},OY=V=>V.parentNode;return v.onMounted(()=>{Qt()}),{showDefaultTableArea:we,maskList:cf,styleData:pt,subMenuLeft:F,subMenuTop:H,pivotWrapRef:S,pivotTableRef:_,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,drillModalRef:y,pivotAggregateRef:p,filterData:d,loadingRect:Kt,loading:A,isTableInit:o,toolBoxStyle:Hs,indSourceRef:_B,searchText:yB,dragAreaStyle:L,offsetWidth:Dt,showTreeData:k,dataIconStyle:He,largeVisible:D,sourceListStyle:ht,defaultTableStyle:Oe,innerFilterStyle:ie,innerFilterFieldList:Bt,innerFilterRef:j,showFilterWrap:$,customDimensions:jl,indicatorFieldList:Lt,dimensionFieldList:kt,pivotWrapStyle:R,fontSize:dt,click:bB,onFilterChange:xY,pivotDetailRef:w,handleFormat:CB,handleCondition:AY,handleAggregate:rY,handleGetTop:RY,handleConfig:CY,handleClearFilter:yY,handleGetConfig:_Y,onDragStart:TY,onDragEnd:MY,onSearch:BY,handleAddField:wY,toggleShowData:FY,handleEnScale:IY,adjustHSL:RC,handleDelFilterTag:kY,handleInnerFilter:LY,getFilterValue:DY,getPopupContainer:OY}}}),OK={key:0,class:"design-template"},zK=["id"],WK=["onClick"],NK=["title"],VK=["id"],jK={class:"box-tooltip"},$K={class:"box-tooltip"};function GK(i,t,e,n,o,r){var M,B;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),_=v.resolveComponent("pivot-property"),w=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),S=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config"),T=v.resolveComponent("drill-modal");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",OK," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),style:v.normalizeStyle(i.pivotWrapStyle),id:`pivotWrap_${i.id}`,ref:"pivotWrapRef"},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=P=>i.searchText=P),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((M=i.innerFilterFieldList)!=null&&M.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,P=>(v.openBlock(),v.createElementBlock("div",{key:P.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:F=>i.handleInnerFilter(P)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(P.showTitle),5),i.getFilterValue(P.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(P.label)},v.toDisplayString(i.getFilterValue(P.label)),13,NK)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor}),onClick:v.withModifiers(F=>i.handleDelFilterTag(P),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,WK))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,VK),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large",style:v.normalizeStyle({scale:i.scaleValue.widthScale})},null,8,["style"])],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0,getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",jK,v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...P)=>i.toggleShowData&&i.toggleShowData(...P))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])):v.createCommentVNode("",!0),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",$K,v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...P)=>i.handleEnScale&&i.handleEnScale(...P))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:v.normalizeStyle({fontSize:i.fontSize+"px",color:"#416EFF"})},null,8,["style"])):(v.openBlock(),v.createBlock(f,{key:1,style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"]))],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[6]||(t[6]=[v.createElementVNode("span",{class:"box-tooltip"},"设置",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...P)=>i.handleConfig&&i.handleConfig(...P))},[v.createVNode(p,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[7]||(t[7]=[v.createElementVNode("span",{class:"box-tooltip"},"清空筛选条件",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...P)=>i.handleClearFilter&&i.handleClearFilter(...P))},[v.createVNode(m,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])],4)):v.createCommentVNode("",!0),(B=i.maskList)!=null&&B.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],14,zK),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(_,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(w,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(S,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"]),v.createVNode(T,{ref:"drillModalRef",scaleValue:i.scaleValue},null,8,["scaleValue"])],8,["to","disabled"]))}const sb=BB(Ti(DK,[["render",GK],["__scopeId","data-v-15f5dbd8"]])),sB=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:sb},Symbol.toStringTag,{value:"Module"})),UK={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(sB).forEach(n=>{const o=sB[n];o.install&&i.use(o)})}},MX="",BX="",KK=v.defineComponent({name:"DrillModal",props:{scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})}},components:{BorderOutlined:_j,SwitcherOutlined:L$,CloseOutlined:Dj,EcanPivotTable:sb},setup(i,{expose:t}){const e={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},n=.37,o=.6,r=.97,s=.9,l=`dmodal_${Ms(6)}`,a=v.inject("getContainer",()=>{}),h=v.inject("theme","light"),d=v.ref({}),u=v.ref([]),c=v.inject("indicatorUrl",""),g=v.inject("splitSymbol",""),f=v.ref([]),p=v.ref(!1),m=v.ref({}),b=v.reactive({keyName:"",visible:!1,columns:[],title:""}),C=v.ref([]),_=v.ref(),w=v.computed(()=>{let P=`drill-modal ${l}`;return p.value&&(P+=" full"),v.unref(h)&&(P+=` ${v.unref(h)}`),P}),y=P=>{const F=document.querySelector(`.${l} .ant-modal-header`);if(F)if(P)F.addEventListener("mousedown",R);else{const H=F.parentElement;H&&(H.style.left="",H.style.top=""),F.removeEventListener("mousedown",R)}},S=P=>{const F=document.querySelector(`.${l} .ant-modal-header`);F&&(P?F.addEventListener("dblclick",A):F.removeEventListener("dblclick",A))},R=P=>{$2(P,`.${l} .ant-modal-header`)},A=()=>{p.value=!p.value,v.nextTick(()=>{p.value?(v.unref(m).width=parseFloat(v.unref(d).width)*r+"px",v.unref(m).height=parseFloat(v.unref(d).height)*s+"px",y(!1)):(v.unref(m).width=parseFloat(v.unref(d).width)*n+"px",v.unref(m).height=parseFloat(v.unref(d).height)*o+"px",y(!0))})},x=()=>{p.value=!1,S(!1),y(!1)},T=({drillDimension:P,drillFieldData:F,usedDimensionFields:H,tableProps:E})=>{const L=Xe.cloneDeep(E),{graphicConfig:I,allDimensions:k,pageConfig:D}=L,O=Ms(6),N=[];C.value=[...H,P.label],k.value=k,D.value=D;const z=I.indicators.filter(j=>j.show).map(j=>j.label);z!=null&&z.length&&(b.title=`下钻:${z.join("、")}`);for(const j of F){const $=k.find(G=>[G.title,G.label].includes(j.dimensionKey)),Y=j.value.split(g);let K=j.value;Y!=null&&Y.length&&(K=Y[Y.length-1]),N.push({conditionKey:$.label,conditionLabel:$.title||$.label,conditionName:$.name,conditionValueType:$.genericType,indexCode:$.indexCode,typeGuid:$.typeGuid,indexCodeNum:$.indexCodeNum,rule:"EQUAL",dataType:"",customValue:K})}I.queryColumnList=[P],N!=null&&N.length&&(I.controlList||(I.controlList=[]),I.controlList.push(...N),I.controlList=[{join:"&&",conditions:I.controlList}]),m.value={...L,id:O,keyName:`透视表_${O}`,position:"relative",top:0,left:0,width:parseFloat(v.unref(D).width)*n+"px",height:parseFloat(v.unref(D).height)*o+"px",graphicConfig:I},b.visible=!0,v.nextTick(()=>{v.unref(_).refreshData(),S(!0),y(!0)})},M=({type:P,data:F})=>{if(P==="11"&&F){const{indicatorList:H=[],queryColumns:E=[]}=F,I=H.concat(E).filter(O=>O.conditions||O.filter),k=B(I,"conditions",!0),D=B(F.sqlConditions,"sqlConditions",!1);f.value=k.concat(D).map(O=>{const N=v.unref(u).find(j=>j.label===O.label);let z=O.fieldValue;if(z&&typeof z=="string"){const j=z.split(",");(j==null?void 0:j.length)>3&&(z=j.slice(0,3).join(",")+"等")}else z||(z='""');return`${(N==null?void 0:N.title)||O.label} ${e[O.rule]} ${z}`})||[]}};function B(P,F,H){const E=[];for(const L of P)L[F]?E.push(...B(L[F],F,H)):L.filter?E.push({...L.filter,label:L.label}):(!H||L.dataType!=="component"&&!(L.fieldValue.startsWith("${")&&L.fieldValue.endsWith("}")))&&E.push(L);return E}return v.watch(b.visible,P=>{window.modalShow&&window.modalShow(P)}),t({showModal:T}),{theme:h,wrapClassName:w,conditionInfo:f,drillInfo:b,pivotTableConfig:m,indicatorUrl:c,isIndFullScreen:p,usedDimensionFields:C,pivotTableRef:_,toggleFullScreen:A,onDetailCancel:x,onPivotTableChange:M,getContainer:a}}}),YK=["title"];function XK(i,t,e,n,o,r){const s=v.resolveComponent("close-outlined"),l=v.resolveComponent("switcher-outlined"),a=v.resolveComponent("border-outlined"),h=v.resolveComponent("ecan-pivot-table"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{"wrap-class-name":i.wrapClassName,visible:i.drillInfo.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.drillInfo.visible=u),width:"60%",footer:null,maskClosable:!1,destroyOnClose:!0,getContainer:i.getContainer,onCancel:i.onDetailCancel},{title:v.withCtx(()=>[v.createElementVNode("div",{class:"modal-title",title:i.conditionInfo.join("、")},v.toDisplayString(i.drillInfo.title)+" "+v.toDisplayString(i.conditionInfo.join("、")),9,YK)]),closeIcon:v.withCtx(()=>[v.createVNode(s,{class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])]),default:v.withCtx(()=>[v.createElementVNode("div",{class:"zoom-btn",onClick:t[0]||(t[0]=(...u)=>i.toggleFullScreen&&i.toggleFullScreen(...u))},[i.isIndFullScreen?(v.openBlock(),v.createBlock(l,{key:0,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])):(v.openBlock(),v.createBlock(a,{key:1,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"]))]),i.drillInfo.visible?(v.openBlock(),v.createElementBlock("div",{key:0,style:v.normalizeStyle({position:"relative",width:i.pivotTableConfig.width,height:i.pivotTableConfig.height})},[v.createVNode(h,v.mergeProps({ref:"pivotTableRef"},i.pivotTableConfig,{theme:i.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,indicatorUrl:i.indicatorUrl,relateKeyName:i.drillInfo.keyName,usedDimensionFields:i.usedDimensionFields,scaleValue:i.scaleValue,onTableChange:i.onPivotTableChange}),null,16,["theme","indicatorUrl","relateKeyName","usedDimensionFields","scaleValue","onTableChange"])],4)):v.createCommentVNode("",!0)]),_:1},8,["wrap-class-name","visible","getContainer","onCancel"])}const qK=Object.freeze(Object.defineProperty({__proto__:null,default:Ti(KK,[["render",XK],["__scopeId","data-v-fbf2c906"]])},Symbol.toStringTag,{value:"Module"}));Je.EcanPivotTable=sb,Je.default=UK,Object.defineProperties(Je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
373
|
+
}`;return Function(`"use strict";return (${X})`)().call(this,U)}function RY(V){A.value=!0;const{value:U,key:X}=V;v.unref(x)[X]=U,iY(),e("tableChange",{type:"6",data:{key:X,value:U}})}function $l(){return n==null?void 0:n.getDrawRange()}const cf=v.ref([]),yB=v.ref(""),_B=v.ref(),TY=(V,U)=>{var Ie,ci,Mo,Bo,wn;const X=U.dataViewColumns[V.oldIndex]||{},{scope:et}=X;let q=!1,tt=!1;["IDX","BUILT_IN_IDX"].includes(et)?q=!0:["DIM","BUILT_IN_DIM"].includes(et)&&(tt=!0);const Z=$l(),{rows:ft,columns:xt,indicators:Ut,records:Wt}=ot,{top:Ft,left:Ht}=Z;if(v.unref(we)){let pi=i.height;i.isIframeMode&&(pi=document.body.clientHeight+"px");let We=v.unref(Oe).width;We.includes("calc")&&(We=v.unref(vt)-v.unref(E)+"px"),L.value.main={width:We,height:pi,top:Ft+v.unref(ue)+"px",left:Ht+v.unref(Dt)+v.unref(ue)+v.unref(K)+"px"},L.value.rows={width:parseFloat(We)/2-Mt*2+"px",height:parseFloat(pi)-Mt*2+"px",top:0,left:0},L.value.columns={width:parseFloat(We)/2-Mt*2+"px",height:parseFloat(pi)/3-Mt*2+"px",top:0,left:parseFloat(We)/2+"px"},L.value.indicators={width:parseFloat(We)/2-Mt*2+"px",height:parseFloat(pi)*2/3-Mt*2+"px",top:parseFloat(pi)/3+"px",left:parseFloat(We)/2+"px"}}else{let pi=50;(Ie=v.unref(Bt))!=null&&Ie.length?pi=v.unref(j).clientHeight:tt&&($.value=!0,v.unref(ie).height=pi+"px");let We=0,hr=1;const jt=n.getRowHeight(0),se={columnHeaderTitle:!0};if(xt!=null&&xt.length?hr+=xt.length:se.columns=[{dimensionKey:Ms(6),title:"",width:"100px",type:"columns"}],ft!=null&&ft.length?ft.forEach((Ze,Ge)=>{We+=n.getColWidth(Ge)}):(We=100,se.rows=[{dimensionKey:Ms(6),title:"",width:"100px",type:"rows"}]),Ut!=null&&Ut.length||(se.indicators=[{indicatorKey:Ms(6),title:"",width:"20%",format:()=>""}]),(ci=Object.keys(se))!=null&&ci.length){const{rows:Ze=[],columns:Ge=[]}=se;let Ue=[];Wt!=null&&Wt.length?Ue=Xe.cloneDeep(Wt):(Bo=(Mo=v.unref(O))==null?void 0:Mo.records)!=null&&Bo.length&&(Ue=Xe.cloneDeep((wn=v.unref(O))==null?void 0:wn.records));let Li=xt.map(Sn=>Sn.dimensionKey);if(!(Li!=null&&Li.length)&&(Ge!=null&&Ge.length)&&(Li=[Ge[0].dimensionKey]),Ue!=null&&Ue.length)for(const Sn of Ue){for(const Xh of Ze)Sn[Xh.dimensionKey]="";let Yh=!1;for(const Xh in Sn)if(Li.includes(Xh)){Yh=!0;break}tt?Yh||(hr=2,Sn[Li[0]]=""):q&&(Yh||(hr=1))}n.updateOption({...ot,...se,records:Ue})}v.nextTick(()=>{var Li;const Ze=$l(),Ge=Ze.width,Ue=Ze.height;L.value.main={width:Ge+"px",height:Ue+pi+"px",top:Ft+v.unref(ue)+"px",left:Ht+v.unref(Dt)+v.unref(ue)+v.unref(K)+"px"},L.value.rows={width:We-Mt*2+"px",height:Ue-Mt*2+"px",top:pi+"px",left:0},L.value.columns={width:Ge-We-Mt*2+"px",height:hr*jt-Mt*2+"px",top:pi+"px",left:We+"px"},L.value.indicators={width:Ge-We-Mt*2+"px",height:Ue-hr*jt-Mt*2+"px",top:hr*jt+((Li=v.unref(Bt))!=null&&Li.length?pi:0)+"px",left:We+"px"},L.value.filters={width:Ge-Mt*2+"px",height:pi-Mt*2+"px",top:0,left:0}})}I.value=X,q?cf.value=[0,1]:tt&&(cf.value=[2])},MY=()=>{var V;(V=v.unref(O).records)!=null&&V.length?n.updateOption({...ot,records:v.unref(O).records}):n.updateOption(ot),$.value=!1,v.unref(ie).height="",cf.value=[]},BY=()=>{var V;(V=v.unref(_B))==null||V.handleSearch(v.unref(yB))},PY=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:x.value,sortData:T.value,colSortData:M.value,indSortData:B.value,aggregateMap:P.value,subMenuLeft:F.value,subMenuTop:H.value,dragAreaStyle:L.value,showTreeData:k.value,largeVisible:D.value,temporaryData:O.value,splitSymbol:ct,sourceListStyle:ht.value,dimensionFieldList:kt.value,indicatorFieldList:Lt.value,computedIndKeys:Nt.value,computedIndMap:ee.value,computedIndFieldMap:he.value,option:ot,loadingRect:Kt.value,calculateList:fe.value,filterList:$e.value,topNumMap:Ps.value,sortMap:Gn.value,customDimensions:jl.value,customIndicators:$h.value,customRowKeys:Gh.value,customColKeys:Uh.value,cacheResData:Y.value,toolBoxStyle:Hs.value,scrollTop:N.value,scrollLeft:z.value}));v.watch(PY,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});const wB=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,x.value=V.topNumData,T.value=V.sortData,M.value=V.colSortData,B.value=V.indSortData,P.value=V.aggregateMap,F.value=V.subMenuLeft,H.value=V.subMenuTop,L.value=V.dragAreaStyle,k.value=V.showTreeData,D.value=V.largeVisible,O.value=V.temporaryData,ct=V.splitSymbol,ht.value=V.sourceListStyle,kt.value=V.dimensionFieldList,Lt.value=V.indicatorFieldList,Nt.value=V.computedIndKeys,ee.value=V.computedIndMap,he.value=V.computedIndFieldMap,Kt.value=V.loadingRect,fe.value=V.calculateList,$e.value=V.filterList,Ps.value=V.topNumMap,Gn.value=V.sortMap,jl.value=V.customDimensions,$h.value=V.customIndicators,Gh.value=V.customRowKeys,Uh.value=V.customColKeys,Y.value=V.cacheResData,Hs.value=V.toolBoxStyle,N.value=V.scrollTop,z.value=V.scrollLeft,Object.assign(ot,V.option)};async function HY(V){var et,q;A.value=!0,V&&wB(V);const U=await lb("get",{keyName:i.relateKeyName||i.keyName}),X=((q=(et=U==null?void 0:U.data)==null?void 0:et.data)==null?void 0:q.searchMap)||{};if(X!=null&&X.data){v.unref(a)||(a.value={}),v.unref(h)||(h.value={});const tt=[];for(const Z of X.data)Z.type==="dimension"?a.value[Z.key]=Z.data:Z.type==="indicators"&&(h.value[Z.key]=Z.data),tt.push({type:Z.type,key:Z.key,rule:Z.data});tt!=null&&tt.length&&hf(tt,{isHandle:!1})}ar()}function EY(){return{dimensions:v.unref(kt),indicators:v.unref(Lt)}}const kY=V=>{const{scope:U,name:X,label:et}=V;let q=[];["IDX","BUILT_IN_IDX"].includes(U)?q=v.unref(Lt):["DIM","BUILT_IN_DIM"].includes(U)&&(q=v.unref(kt));const tt=q.findIndex(Z=>Z.name===X);if(tt!==-1){delete v.unref(a)[q[tt].label];const Z=v.unref($e).findIndex(ft=>ft.key===et);Z!==-1&&v.unref($e).splice(Z,1),q[tt].show?q[tt].isInnerFilter=!1:q.splice(tt,1)}A.value=!0,Kh(),e("tableChange",{type:"10",data:{dimensions:v.unref(kt),indicators:v.unref(Lt)}})},LY=V=>{const{scope:U,label:X,showTitle:et}=V,q=j2(U);q==="indicator"||q==="dimension"&&vB({dimensionKey:X,value:et})};t({option:ot,refreshData:HY,reRenderTable:wB,click:bB,getDrawRange:$l,getSaveData:EY}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],([V,U,X])=>{const{queryColumnList:et=[],indicators:q=[]}=V,tt=Xe.cloneDeep(et),Z=Xe.cloneDeep(q);for(const ft of tt){const xt=U.find(Ut=>Ut.key===ft.name);ft.positionType=(xt==null?void 0:xt.position)||"rows",ft.width=xt==null?void 0:xt.width,ft.showTitle=ft.title||ft.label}for(const ft of Z){const xt=X.find(Ut=>Ut.key===ft.name);ft.width=xt==null?void 0:xt.width,ft.showTitle=ft.label}kt.value=tt,Lt.value=Z},{immediate:!0,deep:!0});const FY=()=>{o.value=!1,k.value=!k.value},IY=()=>{o.value=!1,D.value=!D.value,window.enScale&&window.enScale(v.unref(D))},DY=V=>{const U=v.unref(kt).find(tt=>tt.label===V),X=v.unref(Lt).find(tt=>tt.label===V),et=U||X,q=v.unref(a)[V];return q?et.genericType==="DATE"?Array.isArray(q)?`${q[0].value}~${q[1].value}`:q.value:q.value&&Array.isArray(q.value)?q.value.join("、"):"":""},OY=V=>V.parentNode;return v.onMounted(()=>{Qt()}),{showDefaultTableArea:we,maskList:cf,styleData:pt,subMenuLeft:F,subMenuTop:H,pivotWrapRef:S,pivotTableRef:_,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,drillModalRef:y,pivotAggregateRef:p,filterData:d,loadingRect:Kt,loading:A,isTableInit:o,toolBoxStyle:Hs,indSourceRef:_B,searchText:yB,dragAreaStyle:L,offsetWidth:Dt,showTreeData:k,dataIconStyle:He,largeVisible:D,sourceListStyle:ht,defaultTableStyle:Oe,innerFilterStyle:ie,innerFilterFieldList:Bt,innerFilterRef:j,showFilterWrap:$,customDimensions:jl,indicatorFieldList:Lt,dimensionFieldList:kt,pivotWrapStyle:R,fontSize:dt,click:bB,onFilterChange:xY,pivotDetailRef:w,handleFormat:CB,handleCondition:AY,handleAggregate:rY,handleGetTop:RY,handleConfig:CY,handleClearFilter:yY,handleGetConfig:_Y,onDragStart:TY,onDragEnd:MY,onSearch:BY,handleAddField:wY,toggleShowData:FY,handleEnScale:IY,adjustHSL:RC,handleDelFilterTag:kY,handleInnerFilter:LY,getFilterValue:DY,getPopupContainer:OY}}}),OK={key:0,class:"design-template"},zK=["id"],WK=["onClick"],NK=["title"],VK=["id"],jK={class:"box-tooltip"},$K={class:"box-tooltip"};function GK(i,t,e,n,o,r){var M,B;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),_=v.resolveComponent("pivot-property"),w=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),S=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config"),T=v.resolveComponent("drill-modal");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",OK," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),style:v.normalizeStyle(i.pivotWrapStyle),id:`pivotWrap_${i.id}`,ref:"pivotWrapRef"},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=P=>i.searchText=P),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((M=i.innerFilterFieldList)!=null&&M.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,P=>(v.openBlock(),v.createElementBlock("div",{key:P.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:F=>i.handleInnerFilter(P)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(P.showTitle),5),i.getFilterValue(P.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(P.label)},v.toDisplayString(i.getFilterValue(P.label)),13,NK)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor}),onClick:v.withModifiers(F=>i.handleDelFilterTag(P),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,WK))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,VK),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large",style:v.normalizeStyle({scale:i.scaleValue.widthScale})},null,8,["style"])],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0,getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",jK,v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...P)=>i.toggleShowData&&i.toggleShowData(...P))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])):v.createCommentVNode("",!0),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",$K,v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...P)=>i.handleEnScale&&i.handleEnScale(...P))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:v.normalizeStyle({fontSize:i.fontSize+"px",color:"#416EFF"})},null,8,["style"])):(v.openBlock(),v.createBlock(f,{key:1,style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"]))],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[6]||(t[6]=[v.createElementVNode("span",{class:"box-tooltip"},"设置",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...P)=>i.handleConfig&&i.handleConfig(...P))},[v.createVNode(p,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[7]||(t[7]=[v.createElementVNode("span",{class:"box-tooltip"},"清空筛选条件",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...P)=>i.handleClearFilter&&i.handleClearFilter(...P))},[v.createVNode(m,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])],4)):v.createCommentVNode("",!0),(B=i.maskList)!=null&&B.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],14,zK),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(_,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(w,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(S,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"]),v.createVNode(T,{ref:"drillModalRef",scaleValue:i.scaleValue},null,8,["scaleValue"])],8,["to","disabled"]))}const sb=BB(Ti(DK,[["render",GK],["__scopeId","data-v-54a40b27"]])),sB=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:sb},Symbol.toStringTag,{value:"Module"})),UK={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(sB).forEach(n=>{const o=sB[n];o.install&&i.use(o)})}},MX="",BX="",KK=v.defineComponent({name:"DrillModal",props:{scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})}},components:{BorderOutlined:_j,SwitcherOutlined:L$,CloseOutlined:Dj,EcanPivotTable:sb},setup(i,{expose:t}){const e={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},n=.37,o=.6,r=.97,s=.9,l=`dmodal_${Ms(6)}`,a=()=>document.querySelector("#ProviderConfig > #container")||document.body,h=v.inject("theme","light"),d=v.ref({}),u=v.ref([]),c=v.inject("indicatorUrl",""),g=v.inject("splitSymbol",""),f=v.ref([]),p=v.ref(!1),m=v.ref({}),b=v.reactive({keyName:"",visible:!1,columns:[],title:""}),C=v.ref([]),_=v.ref(),w=v.computed(()=>{let P=`drill-modal ${l}`;return p.value&&(P+=" full"),v.unref(h)&&(P+=` ${v.unref(h)}`),P}),y=P=>{const F=document.querySelector(`.${l} .ant-modal-header`);if(F)if(P)F.addEventListener("mousedown",R);else{const H=F.parentElement;H&&(H.style.left="",H.style.top=""),F.removeEventListener("mousedown",R)}},S=P=>{const F=document.querySelector(`.${l} .ant-modal-header`);F&&(P?F.addEventListener("dblclick",A):F.removeEventListener("dblclick",A))},R=P=>{$2(P,`.${l} .ant-modal-header`)},A=()=>{p.value=!p.value,v.nextTick(()=>{p.value?(v.unref(m).width=parseFloat(v.unref(d).width)*r+"px",v.unref(m).height=parseFloat(v.unref(d).height)*s+"px",y(!1)):(v.unref(m).width=parseFloat(v.unref(d).width)*n+"px",v.unref(m).height=parseFloat(v.unref(d).height)*o+"px",y(!0))})},x=()=>{p.value=!1,S(!1),y(!1)},T=({drillDimension:P,drillFieldData:F,usedDimensionFields:H,tableProps:E})=>{const L=Xe.cloneDeep(E),{graphicConfig:I,allDimensions:k,pageConfig:D}=L,O=Ms(6),N=[];C.value=[...H,P.label],k.value=k,D.value=D;const z=I.indicators.filter(j=>j.show).map(j=>j.label);z!=null&&z.length&&(b.title=`下钻:${z.join("、")}`);for(const j of F){const $=k.find(G=>[G.title,G.label].includes(j.dimensionKey)),Y=j.value.split(g);let K=j.value;Y!=null&&Y.length&&(K=Y[Y.length-1]),N.push({conditionKey:$.label,conditionLabel:$.title||$.label,conditionName:$.name,conditionValueType:$.genericType,indexCode:$.indexCode,typeGuid:$.typeGuid,indexCodeNum:$.indexCodeNum,rule:"EQUAL",dataType:"",customValue:K})}I.queryColumnList=[P],N!=null&&N.length&&(I.controlList||(I.controlList=[]),I.controlList.push(...N),I.controlList=[{join:"&&",conditions:I.controlList}]),m.value={...L,id:O,keyName:`透视表_${O}`,position:"relative",top:0,left:0,width:parseFloat(v.unref(D).width)*n+"px",height:parseFloat(v.unref(D).height)*o+"px",graphicConfig:I},b.visible=!0,v.nextTick(()=>{v.unref(_).refreshData(),S(!0),y(!0)})},M=({type:P,data:F})=>{if(P==="11"&&F){const{indicatorList:H=[],queryColumns:E=[]}=F,I=H.concat(E).filter(O=>O.conditions||O.filter),k=B(I,"conditions",!0),D=B(F.sqlConditions,"sqlConditions",!1);f.value=k.concat(D).map(O=>{const N=v.unref(u).find(j=>j.label===O.label);let z=O.fieldValue;if(z&&typeof z=="string"){const j=z.split(",");(j==null?void 0:j.length)>3&&(z=j.slice(0,3).join(",")+"等")}else z||(z='""');return`${(N==null?void 0:N.title)||O.label} ${e[O.rule]} ${z}`})||[]}};function B(P,F,H){const E=[];for(const L of P)L[F]?E.push(...B(L[F],F,H)):L.filter?E.push({...L.filter,label:L.label}):(!H||L.dataType!=="component"&&!(L.fieldValue.startsWith("${")&&L.fieldValue.endsWith("}")))&&E.push(L);return E}return v.watch(b.visible,P=>{window.modalShow&&window.modalShow(P)}),t({showModal:T}),{theme:h,wrapClassName:w,conditionInfo:f,drillInfo:b,pivotTableConfig:m,indicatorUrl:c,isIndFullScreen:p,usedDimensionFields:C,pivotTableRef:_,toggleFullScreen:A,onDetailCancel:x,onPivotTableChange:M,getContainer:a}}}),YK=["title"];function XK(i,t,e,n,o,r){const s=v.resolveComponent("close-outlined"),l=v.resolveComponent("switcher-outlined"),a=v.resolveComponent("border-outlined"),h=v.resolveComponent("ecan-pivot-table"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{"wrap-class-name":i.wrapClassName,visible:i.drillInfo.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.drillInfo.visible=u),width:"60%",footer:null,maskClosable:!1,destroyOnClose:!0,getContainer:i.getContainer,onCancel:i.onDetailCancel},{title:v.withCtx(()=>[v.createElementVNode("div",{class:"modal-title",title:i.conditionInfo.join("、")},v.toDisplayString(i.drillInfo.title)+" "+v.toDisplayString(i.conditionInfo.join("、")),9,YK)]),closeIcon:v.withCtx(()=>[v.createVNode(s,{class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])]),default:v.withCtx(()=>[v.createElementVNode("div",{class:"zoom-btn",onClick:t[0]||(t[0]=(...u)=>i.toggleFullScreen&&i.toggleFullScreen(...u))},[i.isIndFullScreen?(v.openBlock(),v.createBlock(l,{key:0,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])):(v.openBlock(),v.createBlock(a,{key:1,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"]))]),i.drillInfo.visible?(v.openBlock(),v.createElementBlock("div",{key:0,style:v.normalizeStyle({position:"relative",width:i.pivotTableConfig.width,height:i.pivotTableConfig.height})},[v.createVNode(h,v.mergeProps({ref:"pivotTableRef"},i.pivotTableConfig,{theme:i.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,indicatorUrl:i.indicatorUrl,relateKeyName:i.drillInfo.keyName,usedDimensionFields:i.usedDimensionFields,scaleValue:i.scaleValue,onTableChange:i.onPivotTableChange}),null,16,["theme","indicatorUrl","relateKeyName","usedDimensionFields","scaleValue","onTableChange"])],4)):v.createCommentVNode("",!0)]),_:1},8,["wrap-class-name","visible","getContainer","onCancel"])}const qK=Object.freeze(Object.defineProperty({__proto__:null,default:Ti(KK,[["render",XK],["__scopeId","data-v-e1cadcad"]])},Symbol.toStringTag,{value:"Module"}));Je.EcanPivotTable=sb,Je.default=UK,Object.defineProperties(Je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
374
374
|
//# sourceMappingURL=index.umd.js.map
|