@ecan-bi/indicator-library 1.0.45 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! @ecan-bi/indicator-library@1.0.45 */
2
- (function(me,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(me=typeof globalThis<"u"?globalThis:me||self,e(me["@ecan-bi/indicator-library"]={},me.Vue,me.LodashEs,me.AntDesignVue,me.Draggable,null,null,me.Dayjs,null,me.MonacoEditor,null,me.Echarts))})(this,function(me,e,ne,M,pt,Zp,ef,ie,tf,La,of,Ea){var Ta;"use strict";function Ba(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const Oa=Ba(Ea),Ho=(t,o)=>{if(t.install=n=>{for(const a of[t,...Object.values(o??{})])n.component(a.name,a)},o)for(const[n,a]of Object.entries(o))t[n]=a;return t},Le="$request",xe=((Ta=window==null?void 0:window.config)==null?void 0:Ta.indicatorURL)||"",Ee="INDICATOR_TOKEN",Wo="DATA_LIST",ve="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",Be="UPDATE_GRAPHIC_CONFIG",qo="SHOW_STYLE_CONFIG",Yo="REFRESH_DATA",Tt="CHARTS_OPTIONS",Ko="TABLE_OPTIONS",Va=18,Qt="UPDATE_CHARTS_OPTIONS",Jt="UPDATE_TABLE_OPTIONS",Zt="SOURCE_TYPE",Xo="CHANGE_CONDITION",Qo="DATA_VIEW_COLUMNS",Re="RENDER_USED_COMPONENTS",Lt="UPDATE_USED_COMPONENT",Jo="MAP_ATTRIBUTE_PROPS",Zo={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},Ia={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},$a=e.defineComponent({name:"DataViewList",components:{ASpin:M.Spin,ATreeSelect:M.TreeSelect,Draggable:pt},setup(){var N;const t=e.inject(Le),o=e.unref(e.inject(Ee)),n=e.inject(pe),a=e.inject(Be),r=e.computed(()=>{var L;return((L=e.unref(n))==null?void 0:L.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(N=window==null?void 0:window.config)==null?void 0:N.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var g,x;const L=r.value;l.value=!0;try{const{data:O}=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,O.success&&((g=i.value)==null||g.push(s),i.value=(x=i.value)==null?void 0:x.concat(p([O.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(L=[],g)=>{const x=[];return L.forEach(O=>{x.push({id:O.id,pId:g??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),x},f=async(L,g)=>{var A;let x=0;if(L){const{value:I}=L.dataRef;x=I}const{data:O}=await t.post(`${xe}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:x},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(i.value=(A=e.unref(i))==null?void 0:A.concat(p(O.data)),g&&e.unref(r)&&await c())},u=L=>{k(L),a({dataViewId:L,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(Wo,{setDataList:L=>L}),w=e.ref(!1),b=e.ref([]),k=async L=>{if(L){b.value=[],w.value=!0;try{const g=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:x,data:O={}}=g.data;if(w.value=!1,x){const{rows:A=[]}=O;A==null||A.forEach(I=>{var T;const D=((T=I==null?void 0:I.dataViewColumns)==null?void 0:T.map($=>({...$,show:!0})))||[];b.value=[...e.unref(b),...D]}),h(e.unref(b))}}catch{w.value=!1}}},E=L=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[L],m=(L,g)=>{const x=g[L.oldIndex];if(x){const O={...x,label:x.name,name:x.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await f(void 0,!0),k(e.unref(r))}),{dataViewId:r,handleLoadData:f,treeSelectData:i,treeSelectLoading:l,dataViewList:b,dataViewLoading:w,onDataViewIdChange:u,mapGenericType:E,onDragStart:m}}}),cf="",ee=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},Fa={class:"data-view-list"},Da={class:"columns"},va={class:"column-item"},Pa={class:"column-item-name"};function Ma(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",Fa,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Da,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",va,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Pa,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const ja=ee($a,[["render",Ma],["__scopeId","data-v-4a66f7d2"]]);function ke(t,o){Ra(t)&&(t="100%");var n=Ua(t);return t=o===360?t:Math.min(o,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*o),10)/100),Math.abs(t-o)<1e-6?1:(o===360?t=(t<0?t%o+o:t%o)/parseFloat(String(o)):t=t%o/parseFloat(String(o)),t)}function Ra(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Ua(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Ga(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Et(t){return t<=1?"".concat(Number(t)*100,"%"):t}function eo(t){return t.length===1?"0"+t:String(t)}function za(t,o,n){return{r:ke(t,255)*255,g:ke(o,255)*255,b:ke(n,255)*255}}function to(t,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(o-t)*(6*n):n<1/2?o:n<2/3?t+(o-t)*(2/3-n)*6:t}function Ha(t,o,n){var a,r,l;if(t=ke(t,360),o=ke(o,100),n=ke(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=to(d,i,t+1/3),r=to(d,i,t),l=to(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Wa(t,o,n){t=ke(t,255),o=ke(o,255),n=ke(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function qa(t,o,n){t=ke(t,360)*6,o=ke(o,100),n=ke(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:f*255}}function Ya(t,o,n,a){var r=[eo(Math.round(t).toString(16)),eo(Math.round(o).toString(16)),eo(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function en(t){return be(t)/255}function be(t){return parseInt(t,16)}var tn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ft(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=Qa(t)),typeof t=="object"&&(Pe(t.r)&&Pe(t.g)&&Pe(t.b)?(o=za(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Pe(t.h)&&Pe(t.s)&&Pe(t.v)?(a=Et(t.s),r=Et(t.v),o=qa(t.h,a,r),i=!0,d="hsv"):Pe(t.h)&&Pe(t.s)&&Pe(t.l)&&(a=Et(t.s),l=Et(t.l),o=Ha(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=Ga(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Ka="[-\\+]?\\d+%?",Xa="[-\\+]?\\d*\\.\\d+%?",Ue="(?:".concat(Xa,")|(?:").concat(Ka,")"),oo="[\\s|\\(]+(".concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")\\s*\\)?"),no="[\\s|\\(]+(".concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")\\s*\\)?"),Oe={CSS_UNIT:new RegExp(Ue),rgb:new RegExp("rgb"+oo),rgba:new RegExp("rgba"+no),hsl:new RegExp("hsl"+oo),hsla:new RegExp("hsla"+no),hsv:new RegExp("hsv"+oo),hsva:new RegExp("hsva"+no),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Qa(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(tn[t])t=tn[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Oe.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Oe.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Oe.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Oe.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Oe.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Oe.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Oe.hex8.exec(t),n?{r:be(n[1]),g:be(n[2]),b:be(n[3]),a:en(n[4]),format:o?"name":"hex8"}:(n=Oe.hex6.exec(t),n?{r:be(n[1]),g:be(n[2]),b:be(n[3]),format:o?"name":"hex"}:(n=Oe.hex4.exec(t),n?{r:be(n[1]+n[1]),g:be(n[2]+n[2]),b:be(n[3]+n[3]),a:en(n[4]+n[4]),format:o?"name":"hex8"}:(n=Oe.hex3.exec(t),n?{r:be(n[1]+n[1]),g:be(n[2]+n[2]),b:be(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function Pe(t){return!!Oe.CSS_UNIT.exec(String(t))}var Bt=2,on=.16,Ja=.05,Za=.05,er=.15,nn=5,an=4,tr=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function rn(t){var o=t.r,n=t.g,a=t.b,r=Wa(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Ot(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Ya(o,n,a,!1))}function or(t,o,n){var a=n/100,r={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b};return r}function ln(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Bt*o:Math.round(t.h)+Bt*o:a=n?Math.round(t.h)+Bt*o:Math.round(t.h)-Bt*o,a<0?a+=360:a>=360&&(a-=360),a}function sn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-on*o:o===an?a=t.s+on:a=t.s+Ja*o,a>1&&(a=1),n&&o===nn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function cn(t,o,n){var a;return n?a=t.v+Za*o:a=t.v-er*o,a>1&&(a=1),Number(a.toFixed(2))}function ao(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=ft(t),r=nn;r>0;r-=1){var l=rn(a),i=Ot(ft({h:ln(l,r,!0),s:sn(l,r,!0),v:cn(l,r,!0)}));n.push(i)}n.push(Ot(a));for(var d=1;d<=an;d+=1){var s=rn(a),c=Ot(ft({h:ln(s,d),s:sn(s,d),v:cn(s,d)}));n.push(c)}return o.theme==="dark"?tr.map(function(p){var f=p.index,u=p.opacity,h=Ot(or(ft(o.backgroundColor||"#141414"),ft(n[f]),u*100));return h}):n}var ro={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},lo={},io={};Object.keys(ro).forEach(function(t){lo[t]=ao(ro[t]),lo[t].primary=lo[t][5],io[t]=ao(ro[t],{theme:"dark",backgroundColor:"#141414"}),io[t].primary=io[t][5]});var dn=[],ut=[],nr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function ar(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function rr(t,o){if(o=o||{},t===void 0)throw new Error(nr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=dn.indexOf(a);r===-1&&(r=dn.push(a)-1,ut[r]={});var l;return ut[r]!==void 0&&ut[r][n]!==void 0?l=ut[r][n]:(l=ut[r][n]=ar(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function pn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){lr(t,r,n[r])})}return t}function lr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function ir(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function sr(t,o){ir(t,"[@ant-design/icons-vue] ".concat(o))}function fn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function so(t,o,n){return n?e.h(t.tag,pn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return so(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,pn({key:o},t.attrs),(t.children||[]).map(function(a,r){return so(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function un(t){return ao(t)[0]}function mn(t){return t?Array.isArray(t)?t:[t]:[]}var cr=`
1
+ /*! @ecan-bi/indicator-library@1.0.47 */
2
+ (function(he,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(he=typeof globalThis<"u"?globalThis:he||self,e(he["@ecan-bi/indicator-library"]={},he.Vue,he.LodashEs,he.AntDesignVue,he.Draggable,null,null,he.Dayjs,null,he.MonacoEditor,null,he.Echarts))})(this,function(he,e,ne,v,ft,lf,sf,se,cf,Ba,df,Oa){var Ea;"use strict";function Va(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const Ia=Va(Oa),Wo=(t,o)=>{if(t.install=n=>{for(const a of[t,...Object.values(o??{})])n.component(a.name,a)},o)for(const[n,a]of Object.entries(o))t[n]=a;return t},Le="$request",ke=((Ea=window==null?void 0:window.config)==null?void 0:Ea.indicatorURL)||"",Ee="INDICATOR_TOKEN",qo="DATA_LIST",ve="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",Be="UPDATE_GRAPHIC_CONFIG",Yo="SHOW_STYLE_CONFIG",Ko="REFRESH_DATA",Tt="CHARTS_OPTIONS",Xo="TABLE_OPTIONS",$a=18,Qt="UPDATE_CHARTS_OPTIONS",Jt="UPDATE_TABLE_OPTIONS",Zt="SOURCE_TYPE",Qo="CHANGE_CONDITION",Jo="DATA_VIEW_COLUMNS",Re="RENDER_USED_COMPONENTS",Lt="UPDATE_USED_COMPONENT",Zo="MAP_ATTRIBUTE_PROPS",en={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},Fa={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Da=e.defineComponent({name:"DataViewList",components:{ASpin:v.Spin,ATreeSelect:v.TreeSelect,Draggable:ft},setup(){var B;const t=e.inject(Le),o=e.unref(e.inject(Ee)),n=e.inject(pe),a=e.inject(Be),r=e.computed(()=>{var _;return((_=e.unref(n))==null?void 0:_.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(B=window==null?void 0:window.config)==null?void 0:B.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var g,x;const _=r.value;l.value=!0;try{const{data:O}=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:_,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,O.success&&((g=i.value)==null||g.push(s),i.value=(x=i.value)==null?void 0:x.concat(p([O.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(_=[],g)=>{const x=[];return _.forEach(O=>{x.push({id:O.id,pId:g??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),x},f=async(_,g)=>{var S;let x=0;if(_){const{value:V}=_.dataRef;x=V}const{data:O}=await t.post(`${ke}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:x},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(i.value=(S=e.unref(i))==null?void 0:S.concat(p(O.data)),g&&e.unref(r)&&await c())},m=_=>{N(_),a({dataViewId:_,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(qo,{setDataList:_=>_}),w=e.ref(!1),b=e.ref([]),N=async _=>{if(_){b.value=[],w.value=!0;try{const g=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:_,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:x,data:O={}}=g.data;if(w.value=!1,x){const{rows:S=[]}=O;S==null||S.forEach(V=>{var $;const F=(($=V==null?void 0:V.dataViewColumns)==null?void 0:$.map(P=>({...P,show:!0})))||[];b.value=[...e.unref(b),...F]}),h(e.unref(b))}}catch{w.value=!1}}},E=_=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[_],u=(_,g)=>{const x=g[_.oldIndex];if(x){const O={...x,label:x.name,name:x.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await f(void 0,!0),N(e.unref(r))}),{dataViewId:r,handleLoadData:f,treeSelectData:i,treeSelectLoading:l,dataViewList:b,dataViewLoading:w,onDataViewIdChange:m,mapGenericType:E,onDragStart:u}}}),yf="",te=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},va={class:"data-view-list"},Pa={class:"columns"},Ma={class:"column-item"},ja={class:"column-item-name"};function Ra(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",va,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Pa,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ma,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",ja,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ua=te(Da,[["render",Ra],["__scopeId","data-v-4a66f7d2"]]);function _e(t,o){Ga(t)&&(t="100%");var n=za(t);return t=o===360?t:Math.min(o,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*o),10)/100),Math.abs(t-o)<1e-6?1:(o===360?t=(t<0?t%o+o:t%o)/parseFloat(String(o)):t=t%o/parseFloat(String(o)),t)}function Ga(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function za(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Ha(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Et(t){return t<=1?"".concat(Number(t)*100,"%"):t}function eo(t){return t.length===1?"0"+t:String(t)}function Wa(t,o,n){return{r:_e(t,255)*255,g:_e(o,255)*255,b:_e(n,255)*255}}function to(t,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(o-t)*(6*n):n<1/2?o:n<2/3?t+(o-t)*(2/3-n)*6:t}function qa(t,o,n){var a,r,l;if(t=_e(t,360),o=_e(o,100),n=_e(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=to(d,i,t+1/3),r=to(d,i,t),l=to(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ya(t,o,n){t=_e(t,255),o=_e(o,255),n=_e(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function Ka(t,o,n){t=_e(t,360)*6,o=_e(o,100),n=_e(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:f*255}}function Xa(t,o,n,a){var r=[eo(Math.round(t).toString(16)),eo(Math.round(o).toString(16)),eo(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function tn(t){return be(t)/255}function be(t){return parseInt(t,16)}var on={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ut(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=Za(t)),typeof t=="object"&&(Pe(t.r)&&Pe(t.g)&&Pe(t.b)?(o=Wa(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Pe(t.h)&&Pe(t.s)&&Pe(t.v)?(a=Et(t.s),r=Et(t.v),o=Ka(t.h,a,r),i=!0,d="hsv"):Pe(t.h)&&Pe(t.s)&&Pe(t.l)&&(a=Et(t.s),l=Et(t.l),o=qa(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=Ha(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Qa="[-\\+]?\\d+%?",Ja="[-\\+]?\\d*\\.\\d+%?",Ue="(?:".concat(Ja,")|(?:").concat(Qa,")"),oo="[\\s|\\(]+(".concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")\\s*\\)?"),no="[\\s|\\(]+(".concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")\\s*\\)?"),Oe={CSS_UNIT:new RegExp(Ue),rgb:new RegExp("rgb"+oo),rgba:new RegExp("rgba"+no),hsl:new RegExp("hsl"+oo),hsla:new RegExp("hsla"+no),hsv:new RegExp("hsv"+oo),hsva:new RegExp("hsva"+no),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Za(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(on[t])t=on[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Oe.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Oe.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Oe.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Oe.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Oe.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Oe.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Oe.hex8.exec(t),n?{r:be(n[1]),g:be(n[2]),b:be(n[3]),a:tn(n[4]),format:o?"name":"hex8"}:(n=Oe.hex6.exec(t),n?{r:be(n[1]),g:be(n[2]),b:be(n[3]),format:o?"name":"hex"}:(n=Oe.hex4.exec(t),n?{r:be(n[1]+n[1]),g:be(n[2]+n[2]),b:be(n[3]+n[3]),a:tn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Oe.hex3.exec(t),n?{r:be(n[1]+n[1]),g:be(n[2]+n[2]),b:be(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function Pe(t){return!!Oe.CSS_UNIT.exec(String(t))}var Bt=2,nn=.16,er=.05,tr=.05,or=.15,an=5,rn=4,nr=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ln(t){var o=t.r,n=t.g,a=t.b,r=Ya(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Ot(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Xa(o,n,a,!1))}function ar(t,o,n){var a=n/100,r={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b};return r}function sn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Bt*o:Math.round(t.h)+Bt*o:a=n?Math.round(t.h)+Bt*o:Math.round(t.h)-Bt*o,a<0?a+=360:a>=360&&(a-=360),a}function cn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-nn*o:o===rn?a=t.s+nn:a=t.s+er*o,a>1&&(a=1),n&&o===an&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function dn(t,o,n){var a;return n?a=t.v+tr*o:a=t.v-or*o,a>1&&(a=1),Number(a.toFixed(2))}function ao(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=ut(t),r=an;r>0;r-=1){var l=ln(a),i=Ot(ut({h:sn(l,r,!0),s:cn(l,r,!0),v:dn(l,r,!0)}));n.push(i)}n.push(Ot(a));for(var d=1;d<=rn;d+=1){var s=ln(a),c=Ot(ut({h:sn(s,d),s:cn(s,d),v:dn(s,d)}));n.push(c)}return o.theme==="dark"?nr.map(function(p){var f=p.index,m=p.opacity,h=Ot(ar(ut(o.backgroundColor||"#141414"),ut(n[f]),m*100));return h}):n}var ro={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},lo={},io={};Object.keys(ro).forEach(function(t){lo[t]=ao(ro[t]),lo[t].primary=lo[t][5],io[t]=ao(ro[t],{theme:"dark",backgroundColor:"#141414"}),io[t].primary=io[t][5]});var pn=[],mt=[],rr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function lr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function ir(t,o){if(o=o||{},t===void 0)throw new Error(rr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=pn.indexOf(a);r===-1&&(r=pn.push(a)-1,mt[r]={});var l;return mt[r]!==void 0&&mt[r][n]!==void 0?l=mt[r][n]:(l=mt[r][n]=lr(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function fn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){sr(t,r,n[r])})}return t}function sr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function cr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function dr(t,o){cr(t,"[@ant-design/icons-vue] ".concat(o))}function un(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function so(t,o,n){return n?e.h(t.tag,fn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return so(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,fn({key:o},t.attrs),(t.children||[]).map(function(a,r){return so(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function mn(t){return ao(t)[0]}function hn(t){return t?Array.isArray(t)?t:[t]:[]}var pr=`
3
3
  .anticon {
4
4
  display: inline-block;
5
5
  color: inherit;
@@ -53,12 +53,12 @@
53
53
  transform: rotate(360deg);
54
54
  }
55
55
  }
56
- `,hn=!1,dr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cr;e.nextTick(function(){hn||(typeof window<"u"&&window.document&&window.document.documentElement&&rr(o,{prepend:!0}),hn=!0)})},pr=["icon","primaryColor","secondaryColor"];function fr(t,o){if(t==null)return{};var n=ur(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ur(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Vt(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){mr(t,r,n[r])})}return t}function mr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var mt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function hr(t){var o=t.primaryColor,n=t.secondaryColor;mt.primaryColor=o,mt.secondaryColor=n||un(o),mt.calculated=!!n}function yr(){return Vt({},mt)}var et=function(o,n){var a=Vt({},o,n.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=fr(a,pr),s=mt;if(l&&(s={primaryColor:l,secondaryColor:i||un(l)}),dr(),sr(fn(r),"icon should be icon definiton, but got ".concat(r)),!fn(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Vt({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),so(c.icon,"svg-".concat(c.name),Vt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};et.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},et.inheritAttrs=!1,et.displayName="IconBase",et.getTwoToneColors=yr,et.setTwoToneColors=hr;const co=et;function gr(t,o){return xr(t)||wr(t,o)||Cr(t,o)||br()}function br(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
57
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cr(t,o){if(t){if(typeof t=="string")return yn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yn(t,o)}}function yn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function wr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function xr(t){if(Array.isArray(t))return t}function gn(t){var o=mn(t),n=gr(o,2),a=n[0],r=n[1];return co.setTwoToneColors({primaryColor:a,secondaryColor:r})}function kr(){var t=co.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var _r=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Sr(t,o){return Lr(t)||Tr(t,o)||Nr(t,o)||Ar()}function Ar(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
58
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nr(t,o){if(t){if(typeof t=="string")return bn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bn(t,o)}}function bn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Tr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function Lr(t){if(Array.isArray(t))return t}function Cn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){po(t,r,n[r])})}return t}function po(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Er(t,o){if(t==null)return{};var n=Br(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Br(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}gn("#1890ff");var tt=function(o,n){var a,r=Cn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,f=r.onClick,u=Er(r,_r),h=(a={anticon:!0},po(a,"anticon-".concat(i.name),!!i.name),po(a,l,l),a),w=d===""||d||i.name==="loading"?"anticon-spin":"",b=c;b===void 0&&f&&(b=-1,u.tabindex=b);var k=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,E=mn(p),m=Sr(E,2),N=m[0],L=m[1];return e.createVNode("span",Cn({role:"img","aria-label":i.name},u,{onClick:f,class:h}),[e.createVNode(co,{class:w,icon:i,primaryColor:N,secondaryColor:L,style:k},null)])};tt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},tt.displayName="AntdIcon",tt.inheritAttrs=!1,tt.getTwoToneColor=kr,tt.setTwoToneColor=gn;const _e=tt;var Or={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Vr=Or;function wn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ir(t,r,n[r])})}return t}function Ir(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var fo=function(o,n){var a=wn({},o,n.attrs);return e.createVNode(_e,wn({},a,{icon:Vr}),null)};fo.displayName="AppstoreAddOutlined",fo.inheritAttrs=!1;const xn=fo;var $r={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 Fr=$r;function kn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Dr(t,r,n[r])})}return t}function Dr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var uo=function(o,n){var a=kn({},o,n.attrs);return e.createVNode(_e,kn({},a,{icon:Fr}),null)};uo.displayName="CaretDownOutlined",uo.inheritAttrs=!1;const vr=uo;var Pr={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 Mr=Pr;function _n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){jr(t,r,n[r])})}return t}function jr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var mo=function(o,n){var a=_n({},o,n.attrs);return e.createVNode(_e,_n({},a,{icon:Mr}),null)};mo.displayName="CaretRightOutlined",mo.inheritAttrs=!1;const Rr=mo;var Ur={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 Gr=Ur;function Sn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){zr(t,r,n[r])})}return t}function zr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ho=function(o,n){var a=Sn({},o,n.attrs);return e.createVNode(_e,Sn({},a,{icon:Gr}),null)};ho.displayName="CloseOutlined",ho.inheritAttrs=!1;const yo=ho;var Hr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const Wr=Hr;function An(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){qr(t,r,n[r])})}return t}function qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var go=function(o,n){var a=An({},o,n.attrs);return e.createVNode(_e,An({},a,{icon:Wr}),null)};go.displayName="CopyOutlined",go.inheritAttrs=!1;const Yr=go;var Kr={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 Xr=Kr;function Nn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Qr(t,r,n[r])})}return t}function Qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var bo=function(o,n){var a=Nn({},o,n.attrs);return e.createVNode(_e,Nn({},a,{icon:Xr}),null)};bo.displayName="DeleteOutlined",bo.inheritAttrs=!1;const Jr=bo;var Zr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const el=Zr;function Tn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){tl(t,r,n[r])})}return t}function tl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Co=function(o,n){var a=Tn({},o,n.attrs);return e.createVNode(_e,Tn({},a,{icon:el}),null)};Co.displayName="DoubleRightOutlined",Co.inheritAttrs=!1;const ol=Co;var nl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const al=nl;function Ln(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){rl(t,r,n[r])})}return t}function rl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var wo=function(o,n){var a=Ln({},o,n.attrs);return e.createVNode(_e,Ln({},a,{icon:al}),null)};wo.displayName="DownOutlined",wo.inheritAttrs=!1;const ll=wo;var il={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 sl=il;function En(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){cl(t,r,n[r])})}return t}function cl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var xo=function(o,n){var a=En({},o,n.attrs);return e.createVNode(_e,En({},a,{icon:sl}),null)};xo.displayName="MinusCircleOutlined",xo.inheritAttrs=!1;const dl=xo;var pl={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 fl=pl;function Bn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ul(t,r,n[r])})}return t}function ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ko=function(o,n){var a=Bn({},o,n.attrs);return e.createVNode(_e,Bn({},a,{icon:fl}),null)};ko.displayName="PlusCircleOutlined",ko.inheritAttrs=!1;const ml=ko;var hl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const yl=hl;function On(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){gl(t,r,n[r])})}return t}function gl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var _o=function(o,n){var a=On({},o,n.attrs);return e.createVNode(_e,On({},a,{icon:yl}),null)};_o.displayName="PlusOutlined",_o.inheritAttrs=!1;const bl=_o;var Cl={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 wl=Cl;function Vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){xl(t,r,n[r])})}return t}function xl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var So=function(o,n){var a=Vn({},o,n.attrs);return e.createVNode(_e,Vn({},a,{icon:wl}),null)};So.displayName="SettingOutlined",So.inheritAttrs=!1;const kl=So,_l=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Rr,CaretDownOutlined:vr,AInputSearch:M.InputSearch,ASpin:M.Spin,APagination:M.Pagination,Draggable:pt},setup(){var L;const t=(L=window==null?void 0:window.config)==null?void 0:L.pageId,o=e.inject(Le),n=e.unref(e.inject(Ee)),a=e.inject(ve),r=e.computed(()=>{var g;return(g=e.unref(a))==null?void 0:g.graphicConfig}),l=e.computed(()=>{var g;return(g=e.unref(r))==null?void 0:g.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const g={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const x=await o.post(`${xe}/diagram/sourceList`,g,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:O,data:A={}}=x.data;if(O){const{rows:I=[],total:D=0}=A;I==null||I.forEach(T=>{var $;T.show=!1,($=T.dataViewColumns)==null||$.forEach(y=>{y.show=!0,y.edit=!1,y.title&&(y.label=y.title)})}),i.value=I,s.totalResult=+D}}catch{d.value=!1}},f=g=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[g],u=g=>{i.value[g].show=!i.value[g].show},h=()=>{s.currentPage=1,p()},w=ne.debounce(()=>{s.currentPage=1,p()},200),b=(g,x)=>{s.pageSize=x,s.currentPage=g,p()};e.onMounted(()=>{p()});const k=e.inject(pe),E=e.computed(()=>{const g=["classificationList","rowHeaderList"];let x=[];for(const O in e.unref(k))if(Object.prototype.hasOwnProperty.call(e.unref(k),O)&&g.includes(O)){const A=e.unref(k)[O];Array.isArray(A)&&(x=x.concat(A))}return x});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:u,mapScope:f,onSearch:h,onChange:w,onPaginationChange:b,searchText:c,setItemDisabled:(g=[])=>{let x=!1;for(const O of e.unref(E))if(!g.find(I=>I.typeGuid===O.typeGuid)){x=!0;break}return x},onDragStart:(g,x)=>{const O=x[g.oldIndex];O&&sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}}}}),df="",Sl={class:"data-source-list"},Al={class:"columns"},Nl={class:"column-item"},Tl=["onClick"],Ll={key:0},El={class:"column-child-item"},Bl={class:"column-child-item-name"};function Ol(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),f=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=u=>t.searchText=u),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Al,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(u,h)=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass(t.setItemDisabled(u.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Nl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(h)},[u.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(u.indexCode+" "+u.name),1)],8,Tl)]),u.show?(e.openBlock(),e.createElementBlock("div",Ll,[e.createVNode(c,{modelValue:u.dataViewColumns,"onUpdate:modelValue":w=>u.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(u.dataViewColumns),onStart:w=>t.onDragStart(w,u.dataViewColumns)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",El,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",Bl,e.toDisplayString(w.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(f,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=u=>t.pagination.pageSize=u),total:t.pagination.totalResult,"show-total":u=>`共 ${u} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=u=>t.pagination.currentPage=u),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Vl=ee(_l,[["render",Ol],["__scopeId","data-v-b23ce142"]]),Il=e.defineComponent({name:"DataList",components:{DataSourceList:Vl,DataViewList:ja},setup(){return{source:e.inject(Zt)}}});function $l(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Fl=ee(Il,[["render",$l]]),In={mounted(t){t.focus()}},Dl=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:pt,AModal:M.Modal,AButton:M.Button},setup(t,{expose:o}){var N;const n=(N=window==null?void 0:window.config)==null?void 0:N.pageId,a=e.inject(Le),r=e.unref(e.inject(Ee)),l=e.inject(pe),i=e.inject(Be),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const L=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:g,data:x=[]}=L.data;g&&(c.value=x==null?void 0:x.slice(0,200))}catch(L){console.error(L)}},f=()=>{var A;const L=((A=e.unref(l)[t.type])==null?void 0:A.slice())||[],g=L[t.index],{label:x,name:O}=t.item;g.sort={label:x,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:L})};let u=!1;const h=()=>{u=!0},w=e.ref(!1),b=()=>{w.value=!0},k=()=>{w.value=!1},E=()=>{u&&f(),u=!1,k()};return o({showModal:b}),e.watch(w,L=>{var g,x;if(L){const O=(x=(g=t.item)==null?void 0:g.sort)==null?void 0:x.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!L)},{flush:"post"}),{visible:w,onCancel:E,customSortList:c,onChange:h,onDeleteConfig:()=>{var A;const L=((A=e.unref(l)[t.type])==null?void 0:A.slice())||[],g=L[t.index],{label:x,name:O}=t.item;g.sort={label:x,columnName:O},i({[t.type]:L}),k()}}}}),pf="",vl={class:"button-wrapper"},Pl={class:"sort-item"};function Ml(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",vl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Pl,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const jl=ee(Dl,[["render",Ml],["__scopeId","data-v-8e16d201"]]),Rl=e.defineComponent({name:"CustomGroupModal",directives:{focus:In},components:{CloseOutlined:yo,AModal:M.Modal,ASelect:M.Select,ASelectOption:M.SelectOption,AButton:M.Button,AInput:M.Input,ACheckbox:M.Checkbox,ACollapse:M.Collapse,ACollapsePanel:M.CollapsePanel,ATag:M.Tag,ACheckableTag:M.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var U;const n=e.inject(Le),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(Ee));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const C=e.unref(c).map(_=>_.title);return new Set(C)}),f=e.ref([]);e.watch(()=>e.unref(c).length,C=>{f.value=new Array(C).fill(!1)});const u=e.computed(()=>{let C=0;return e.unref(c).forEach(_=>{var B;(B=_.data)==null||B.forEach(j=>{j.checked&&C++})}),C}),h=()=>{const C=e.unref(d);if(!C){M.message.error("创建分组名不能空");return}e.unref(p).has(C)?M.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:C,data:[]}),l=!0)},w=C=>{e.unref(c).splice(C,1),l=!0},b=e.ref(null),k=()=>{if(e.unref(u)===0){M.message.error("当前移入分组已选个数为0");return}const C=e.unref(b);if(C==null){M.message.error("请选择移入分组");return}if(!e.unref(c)[C]){M.message.error("移入分组不存在,请重新选择");return}const _=[],B=e.unref(c).length;for(let j=0;j<B;j++){const v=e.unref(c)[j];e.unref(c)[j].data=v.data.filter(W=>(W.checked&&_.push({...W,checked:!1}),!W.checked))}e.unref(c)[C].data=[..._,...e.unref(c)[C].data],l=!0},E=C=>{e.unref(f)[C]=!0},m=C=>{e.unref(f)[C]=!1},N=(C,_)=>{const B=C.target.value;e.unref(p).has(B)&&M.message.error("组名不能相同,请修改"),e.unref(c)[_].title=B,l=!0},L=e.inject(pe),g=e.inject(Be),x=e.computed(()=>e.unref(L).source),O=e.computed(()=>e.unref(L).dataViewId),A=e.ref(!1),I=()=>{var X,Q;const C=e.unref(c);let _="";e.unref(A)&&(_=(X=C[0])==null?void 0:X.title);const B=C==null?void 0:C.length,j={};for(let te=1;te<B;te++){const le=C[te]||{},{title:fe,data:ue}=le;j[fe]=(ue==null?void 0:ue.map(Ie=>Ie.label))||[]}const v=((Q=e.unref(L)[t.type])==null?void 0:Q.slice())||[],W=v[t.index];W.customGroup={groupInfoMap:j,otherGroupName:_},g({[t.type]:v})},D=e.ref(!1),T=()=>{D.value=!0},$=()=>{D.value=!1},y=()=>{$(),l&&I(),l=!1},S=()=>{l=!0},V=new Set,F=async()=>{const C=t.item.customGroup||{},_=C.otherGroupName,B=C.groupInfoMap;(_===""||_==null)&&(A.value=!1),e.unref(c)[0]={title:_||"未分组",data:[]};let j=1;for(const v in B)if(Object.prototype.hasOwnProperty.call(B,v)){const X=B[v].map(Q=>(V.add(Q),{label:Q,checked:!1}));e.unref(c)[j]={title:v,data:X},j++}await P()},P=async()=>{var C;try{const _=await n.post(`${xe}/diagram/groupvalue`,{source:e.unref(x),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:B,data:j=[]}=_.data;if(B){const v=[];(C=j==null?void 0:j.slice(0,200))==null||C.forEach(W=>{V.has(W)||v.push({label:W,checked:!1})}),e.unref(c)[0].data=v}}catch(_){console.error(_)}};return e.watch(D,C=>{C&&F(),window.changeShowTable&&window.changeShowTable(!C)},{flush:"post"}),o({showModal:T}),{visible:D,title:i,activeKey:s,customGroupList:c,onCancel:y,useOtherGroup:A,selectCount:u,createGroupTitle:d,onAddGroup:h,onDeleteGroup:w,onMoveInGroup:k,selectGroupIndex:b,onEditTitle:E,onTitleChange:N,onFinishEditTitle:m,onUseOtherGroup:S,customGroupEditTitleList:f}}}),ff="",uf="",Ul={class:"custom-group-header"},Gl={class:"move-and-create"},zl={class:"select-tip"},Hl={class:"select-count"},Wl={class:"create-group"},ql={class:"custom-group-content"},Yl=["onClick"],Kl={class:"extra"},Xl={class:"custom-group-list"},Ql={class:"text"};function Jl(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),f=e.resolveComponent("a-tag"),u=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),b=e.resolveComponent("a-collapse"),k=e.resolveComponent("a-modal"),E=e.resolveDirective("focus");return e.openBlock(),e.createBlock(k,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Ul,[e.createElementVNode("div",Gl,[e.createElementVNode("div",null,[e.createElementVNode("span",zl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Hl,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=m=>t.selectGroupIndex=m),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(m,N)=>(e.openBlock(),e.createBlock(i,{key:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Wl,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=m=>t.createGroupTitle=m),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=m=>t.useOtherGroup=m),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",ql,[e.createVNode(b,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=m=>t.activeKey=m),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(m,N)=>(e.openBlock(),e.createBlock(w,{key:N},{header:e.withCtx(()=>[t.customGroupEditTitleList[N]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:m.title,size:"small",onChange:L=>t.onTitleChange(L,N),onBlur:L=>t.onFinishEditTitle(N),onPressEnter:L=>t.onFinishEditTitle(N)},null,8,["value","onChange","onBlur","onPressEnter"])),[[E]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(L=>t.onEditTitle(N),["prevent","stop"])},e.toDisplayString(m.title),9,Yl))]),extra:e.withCtx(()=>[e.createElementVNode("div",Kl,[N===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(f,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),N!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(u,{onClick:e.withModifiers(L=>t.onDeleteGroup(N),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Xl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.data,(L,g)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:L.checked,"onUpdate:checked":x=>L.checked=x,class:"custom-group",key:g},{default:e.withCtx(()=>[e.createElementVNode("span",Ql,e.toDisplayString(L.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Zl=ee(Rl,[["render",Jl],["__scopeId","data-v-7e3049d2"]]);var ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ao={},ti={get exports(){return Ao},set exports(t){Ao=t}};(function(t,o){(function(n,a){t.exports=a()})(ei,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var f=this.$utils(),u=!!f.u(p)||p;if(f.p(c)===a){var h=this.quarter()-1;return u?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(ti);const oi=Ao;ie.extend(oi);const ni=e.defineComponent({name:"Condition",components:{CloseOutlined:yo,DownOutlined:ll,AppstoreAddOutlined:xn,ASelect:M.Select,AInput:M.Input,ADatePicker:M.DatePicker,AButton:M.Button,ADropdown:M.Dropdown,AMenu:M.Menu,AMenuItem:M.MenuItem,ASubMenu:M.SubMenu,APopover:M.Popover,ATabs:M.Tabs,ATabPane:M.TabPane,ARadioGroup:M.RadioGroup,ARadio:M.Radio,AInputNumber:M.InputNumber,ASelectOption:M.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var Ie,Ye,Ke,Xe,Qe,ze,Je,ct,dt;const o=(Ie=window==null?void 0:window.config)==null?void 0:Ie.pageId,n=e.inject(pe),a=e.inject(Le),r=e.unref(e.inject(Ee)),l=e.inject(Qo),i=e.inject(Re),d=e.computed(()=>{var H;const R=[];return(H=e.unref(i))==null||H.forEach(Y=>{const{keyName:J="",id:Z="",type:ce}=Y;ce==="ecanRangePicker"?R.push({value:`${Z}-startTime`,label:`${J||Z}-开始时间值`,keyName:`${J||Z}-startTime`,id:Z},{value:`${Z}-endTime`,label:`${J||Z}-结束时间值`,keyName:`${J||Z}-endTime`,id:Z}):R.push({value:Z,label:`${J||Z}`,keyName:`${J||Z}`,id:Z})}),R}),s=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.dataViewId}),c=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.source}),p=e.ref(!1),f={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},u=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],h=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),w=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),b=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],k=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],E=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],m=e.ref({fieldName:(Ye=t.data)==null?void 0:Ye.fieldName,fieldType:(Ke=t.data)==null?void 0:Ke.fieldType,rule:(Xe=t.data)==null?void 0:Xe.rule,id:(Qe=t.data)==null?void 0:Qe.id,fieldValue:N(),label:(ze=t.data)==null?void 0:ze.label,targetSource:"",typeGuid:(Je=t.data)==null?void 0:Je.typeGuid,dataType:((ct=t.data)==null?void 0:ct.dataType)||"",componentId:((dt=t.data)==null?void 0:dt.componentId)||""});function N(){const{fieldType:R="",dataType:H="",fieldValue:Y=""}=t.data;if(R==="DATE"&&H==="time")return ie(Y);if(H==="component"){const J=e.unref(d).find(Z=>Z.keyName===Y);return J?J.value:Y}else return Y}const L=e.ref(!1),g=e.computed(()=>m.value.fieldType==="DATE"),x=e.computed(()=>{const R=t.type;let H=[];if(["classificationList","seriesList","rowHeaderList"].includes(R)){let Y=[];for(const J in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),J)&&!["controlList","sqlConditions"].includes(J)){const Z=e.unref(n)[J];Array.isArray(Z)&&(["classificationList","seriesList","rowHeaderList"].includes(J)?Y=Y.concat(Z.filter(ce=>ce.show)):Y=Y.concat(Z))}H=Y}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(R)&&(H=e.unref(l));return H.map(Y=>({...Y,label:Y.title||Y.label,value:Y.name}))}),{updateCondition:O,deleteCondition:A}=e.inject(Xo,{updateCondition:(R,H,Y)=>{},deleteCondition:(R,H)=>{}}),I=()=>{A(t.level,t.index)};e.watch(m,R=>{const H=ne.cloneDeep(R);R.fieldType==="DATE"&&R.dataType!=="component"&&R.fieldValue&&(H.fieldValue=R.fieldValue.format(R.dateFormat)),O(H,t.level,t.index)},{deep:!0});const D=R=>{const H=e.unref(x).find(G=>G.value===R)||{},{name:Y,genericType:J,id:Z,label:ce,typeGuid:ge}=H;m.value={id:Z,fieldName:Y,fieldType:J,label:ce,rule:"",fieldValue:J==="DATE"?null:void 0,targetSource:"",typeGuid:ge,dataType:""}},T=R=>{const H=e.unref(d).find(Y=>Y.value===R)||{};e.unref(m).componentId=H.id||""},$=e.computed(()=>{const R=e.unref(m).fieldType;return R==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:R==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:R==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),y=e.computed(()=>{let R="";const H=e.unref($).find(Y=>Y.value===e.unref(m).rule);return H&&(R=H.label),R}),S=e.computed(()=>{let R={fontSize:"12px"};return e.unref(y)||(R={...R,position:"absolute",right:"11px",top:"9px"}),R}),V=e.ref([]),F=async()=>{var R;if(!(e.unref(V).length>0))try{const H=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(c),dataViewId:e.unref(s),groupColumn:e.unref(m).fieldName,hrpIndexTypeGuid:e.unref(m).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:Y,data:J=[]}=H.data;Y&&(V.value=(R=J==null?void 0:J.slice(0,200))==null?void 0:R.map(Z=>({label:Z,value:Z})))}catch(H){console.error(H)}},P=R=>{e.unref(m).rule=R,e.unref(m).fieldValue=e.unref(m).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(R)&&F()},U=R=>{e.unref(m).dataType=R,e.unref(m).fieldValue=""},C=e.ref(),_=R=>{C.value=R,e.unref(m).fieldValue=(R==null?void 0:R.join(","))||""},B=R=>{const{keyPath:H}=R;e.unref(m).rule=H[0],e.unref(m).dataType=H[1],e.unref(m).dateFormat=H[2],e.unref(m).fieldValue=""};e.onMounted(()=>{var J,Z,ce,ge,G,z,q;if(m.value.dataType=((J=t.data)==null?void 0:J.dataType)||"",m.value.componentId=((Z=t.data)==null?void 0:Z.componentId)||"",e.unref(m).fieldType==="DATE"){const{activeKey:K,dateCalcTypes:se=[]}=t.data||{};if(e.unref(m).dateFormat=(ce=t.data)==null?void 0:ce.dateFormat,e.unref(m).activeKey=K,e.unref(m).calcWays=((ge=t.data)==null?void 0:ge.calcWays)||[],e.unref(m).dateCalcTypes=se,K===5){const re=e.unref(m).calcWays[0];if(re){const oe=re.split("-");e.unref(h).expression=oe[0],e.unref(h).around=oe[1]}e.unref(h).unit=se[0]||"YEAR"}else{e.unref(m).radioValue=((G=t.data)==null?void 0:G.radioValue)||"";const re=e.unref(w).find(oe=>{var we;return oe.key===((we=t.data)==null?void 0:we.activeKey)});re&&le(re,t.data)}}else C.value=((q=(z=t.data)==null?void 0:z.fieldValue)==null?void 0:q.split(","))||[];const{fieldType:R,fieldName:H,rule:Y}=m.value;R!=="DATE"&&H&&Y&&["IN","NOT_IN"].includes(Y)&&F()});const j=R=>{if(e.unref(m).activeKey===R){e.unref(w)[R].radioValue=e.unref(m).radioValue,e.unref(w)[e.unref(m).activeKey]&&(e.unref(w)[e.unref(m).activeKey].radioValue=e.unref(m).radioValue,e.unref(m).radioValue==="1"?e.unref(w)[R].beforeNum=e.unref(m).calcWays[0]:e.unref(m).radioValue==="2"&&(e.unref(w)[R].afterNum=e.unref(m).calcWays[0]));return}e.unref(w).forEach(H=>{H.beforeNum=0,H.afterNum=0,H.radioValue="1",H.value=""})},v=(R,H)=>{p.value=!0;const Y=R.target.value,J=H.type,Z=e.unref(m).dateFormat,ce=Math.abs(H.beforeNum),ge=H.afterNum;H.value=fe(Y,J,Z,ce,ge)},W=R=>{const H=e.unref(m).activeKey;if(R!==H)return;let Y="";H===0?Y="years":H===1?Y="quarters":H===2?Y="months":H===3?Y="weeks":H===4&&(Y="days");const J=e.unref(m).dateFormat,Z=e.unref(m).radioValue;let ce=0,ge=0;return Z==="1"?ce=Math.abs(e.unref(m).calcWays[0]):Z==="2"&&(ge=e.unref(m).calcWays[0]),fe(Z,Y,J,ce,ge)},X=(R,H,Y,J)=>{if(p.value=!0,H.radioValue===J){const Z=R.target.value;Y==="+"?H.value=ie().add(Z,H.type).format(e.unref(m).dateFormat):H.value=ie().subtract(Z,H.type).format(e.unref(m).dateFormat)}},Q=(R,H)=>{(e.unref(m).fieldType!=="DATE"||e.unref(m).dataType!=="component")&&(m.value.fieldValue=ie(R.value,e.unref(m).dateFormat)),e.unref(m).calcWays||(e.unref(m).calcWays=[]),e.unref(m).activeKey=H,e.unref(m).radioValue=R.radioValue,R.radioValue==="1"?e.unref(m).calcWays[0]="-"+R.beforeNum:R.radioValue==="2"?e.unref(m).calcWays[0]=R.afterNum:R.radioValue==="3"?H===4?e.unref(m).calcWays[0]="0":e.unref(m).calcWays[0]="BEGIN":R.radioValue==="4"&&(e.unref(m).calcWays[0]="END"),H===0?e.unref(m).dateCalcTypes=["YEAR"]:H===1?e.unref(m).dateCalcTypes=["QUARTER"]:H===2?e.unref(m).dateCalcTypes=["MONTH"]:H===3?e.unref(m).dateCalcTypes=["WEEK"]:H===4&&(e.unref(m).dateCalcTypes=["DAY"]),L.value=!1},te=()=>{e.unref(m).activeKey=5,e.unref(m).dateCalcTypes=[e.unref(h).unit],e.unref(m).calcWays[0]=`${e.unref(h).expression}-${e.unref(h).around}`,L.value=!1};function le(R,H){const{radioValue:Y="",calcWays:J=[]}=H;R.radioValue=Y,J!=null&&J.length&&(Y==="1"?R.beforeNum=Math.abs(J[0]):Y==="2"&&(R.afterNum=J[0]))}function fe(R,H,Y,J,Z){if(R==="1")return ie().subtract(J,H).format(Y);if(R==="2")return ie().add(Z,H).format(Y);if(R==="3"){if(H==="years")return ie().startOf("year").format(Y);if(H==="quarters")return ie().startOf("quarter").format(Y);if(H==="months")return ie().startOf("month").format(Y);if(H==="days")return ie().format(Y)}else if(R==="4"){if(H==="years")return ie().endOf("year").format(Y);if(H==="quarters")return ie().endOf("quarter").format(Y);if(H==="months")return ie().endOf("month").format(Y)}return""}return{fieldOptions:x,ruleOptions:$,onFieldChange:D,condition:m,valueOptions:V,onRuleChange:P,onDataTypeChange:U,onFieldValueSelectChange:_,fieldValues:C,onDelete:I,isDateType:g,formatList:u,tabDateList:w,compareList:b,menuRule:k,dateBtnLabel:y,downIconStyle:S,popoverVisible:L,dateRadioStyle:f,showTime:p,controlList:d,dataTypeList:E,customTabData:h,handleMenuClick:B,changeTabInitDate:j,changeRadioValue:v,getFieldValue:W,blurCompare:X,okDatePickConfig:Q,onChangeComponent:T,filterOption:(R,H)=>H.label.toLowerCase().indexOf(R.toLowerCase())>=0,okCustomConfig:te}}}),mf="",hf="",ai={class:"condition"},ri=["title"],li={class:"rule"},ii={class:"data-type"},si={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},ci={class:"popover-content-wrap"},di={class:"tabFilterRadio"},pi={key:0},fi={key:1},ui={style:{"margin-left":"10px"}},mi={style:{"margin-left":"10px"}},hi={style:{position:"absolute",bottom:"10px"}},yi={style:{display:"flex"}},gi={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function bi(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),f=e.resolveComponent("DownOutlined"),u=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),b=e.resolveComponent("a-input-number"),k=e.resolveComponent("a-radio"),E=e.resolveComponent("a-radio-group"),m=e.resolveComponent("a-tab-pane"),N=e.resolveComponent("a-tabs"),L=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),x=e.resolveComponent("a-input"),O=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ai,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(A,I)=>(e.openBlock(),e.createBlock(i,{key:I,value:A.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:A.label},e.toDisplayString(A.label),9,ri)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",li,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,A=>(e.openBlock(),e.createBlock(c,{key:A.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===A.value?"color: #1890FF;":"")},e.toDisplayString(A.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,I=>{var D;return e.openBlock(),e.createBlock(c,{key:I.value,disabled:I.value==="component"&&!((D=t.controlList)!=null&&D.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===A.value&&t.condition.dataType===I.value?"color: #1890FF;":"")},e.toDisplayString(I.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,T=>(e.openBlock(),e.createBlock(s,{key:T.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===A.value&&t.condition.dataType===I.value&&t.condition.dateFormat===T.value?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(f,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",ii,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(A,I)=>(e.openBlock(),e.createBlock(i,{key:I,value:A.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",si,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(w,{key:0,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=A=>t.condition.fieldValue=A),format:t.condition.dateFormat},null,8,["value","format"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=A=>t.condition.fieldValue=A),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(g,{visible:t.popoverVisible,"onUpdate:visible":o[8]||(o[8]=A=>t.popoverVisible=A),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",ci,[e.createVNode(N,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(A,I)=>(e.openBlock(),e.createBlock(m,{key:I,tab:A.label},{default:e.withCtx(()=>[e.createElementVNode("div",di,[e.createVNode(E,{value:A.radioValue,"onUpdate:value":D=>A.radioValue=D,onChange:D=>t.changeRadioValue(D,A)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",pi,"相对当前时间:"+e.toDisplayString(A.value),1)):(e.openBlock(),e.createElementBlock("div",fi,"相对当前时间:"+e.toDisplayString(t.getFieldValue(I)),1)),e.createVNode(k,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(b,{value:A.beforeNum,"onUpdate:value":D=>A.beforeNum=D,min:0,onBlur:D=>t.blurCompare(D,A,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ui,e.toDisplayString(A.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(k,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(b,{value:A.afterNum,"onUpdate:value":D=>A.afterNum=D,min:0,onBlur:D=>t.blurCompare(D,A,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",mi,e.toDisplayString(A.afterLabel),1)]),_:2},1032,["style"]),A.beforeText?(e.openBlock(),e.createBlock(k,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),A.afterText?(e.openBlock(),e.createBlock(k,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",hi,[e.createVNode(u,{style:{"margin-right":"12px"},onClick:o[2]||(o[2]=D=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(u,{onClick:D=>t.okDatePickConfig(A,I)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(m,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[3]||(o[3]=A=>t.customTabData.expression=A),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[4]||(o[4]=A=>t.customTabData.unit=A),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[5]||(o[5]=A=>t.customTabData.around=A)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",gi,[e.createVNode(u,{style:{"margin-right":"12px"},onClick:o[6]||(o[6]=A=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(u,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[7]||(o[7]=A=>{t.popoverVisible=!0})},[e.createVNode(L)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[9]||(o[9]=A=>t.condition.fieldValue=A),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(x,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=A=>t.condition.fieldValue=A)},null,8,["value"])),e.createVNode(O,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Ci=ee(ni,[["render",bi],["__scopeId","data-v-77882f26"]]),wi=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Ci}}),yf="",xi={key:0,class:"condition-list"},ki={key:0,class:"condition-container"},_i={key:0,class:"condition-text"},Si={key:1,class:"condition-text"},Ai={class:"conditions"};function Ni(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",xi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",ki,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",_i,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Si,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Ai,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Ti=ee(wi,[["render",Ni],["__scopeId","data-v-86c0c5aa"]]),Li=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:M.Select,AInput:M.Input,AInputNumber:M.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=ne.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),gf="",$n=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Ei={class:"truncations"},Bi={class:"rule"},Oi={class:"field-value"},Vi={class:"field-value"},Ii=$n(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),$i=$n(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Fi=["onClick"];function Di(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",Bi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":f=>c.rule=f,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Oi,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":f=>c.num=f,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",Vi,[Ii,e.createVNode(s,{value:c.name,"onUpdate:value":f=>c.name=f,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),$i]),e.createElementVNode("div",{class:"clear-truncation",onClick:f=>t.clearData(c)},"清空",8,Fi)]))),128))])}const vi=ee(Li,[["render",Di],["__scopeId","data-v-f543c690"]]),Ve=(t,o)=>{if(typeof t=="string"&&typeof o=="string")return t.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const r=o[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},Pi=t=>t.replace(/\\n/g,`
59
- `),No=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),It=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...It(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},Fn=(t,o)=>{var b;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],seriesList:l=[],leftAxisList:i=[],rightAxisList:d=[],queryColumnList:s=[],indicators:c=[]}=t,p=[],f=[...a,...r,...l,...i,...d,...s,...c],u=[];for(const k of f){const E=It((k==null?void 0:k.conditions)||[]);if(E!=null&&E.length){const m=E.filter(N=>Dn(N,o)?(N==null?void 0:N.dataType)==="component":!1).map(N=>{const L=Dn(N,o),g={};return N!=null&&N.dateFormat&&(g.format=N.dateFormat),{conditionKey:N.fieldName,conditionLabel:N.fieldName,conditionName:N.fieldName,conditionValueType:N.fieldType,id:L.id,keyName:N.fieldValue,rule:N.rule,notGlobal:!0,...g}});if(m!=null&&m.length)for(const N of m)u.find(L=>L.keyName===N.keyName)||u.push(N)}}const h=n.concat(u),w=h.length;for(let k=0;k<w;k++){const E=h[k];if(E&&!((b=Object.keys(E))!=null&&b.length)||(E==null?void 0:E.conditionKey)==="parentCode")continue;const{id:m,keyName:N,conditionLabel:L,conditionKey:g,conditionValueType:x,prop:O,rule:A="NONE",notGlobal:I=!1,format:D}=E;let T=N||m;T&&O&&(T+=`-${O}`);const $=o.find(_=>_.id===m),y={rule:A,label:L,fieldName:g,fieldValue:"",valueType:x,alias:T,globalCondition:!I},{value:S,format:V="YYYY-MM-DD",operate:F,type:P="",useCurrentTime:U}=$||{},C=D||V;if(Ve(P,"date")){let _;if(U?_=ie():_=ie(S),F&&S){const{mode:B,type:j,value:v}=F;if(v)switch(j){case"add":_=_.add(v,B);break;case"minus":_=_.subtract(v,B);break}}y.fieldValue=(_==null?void 0:_.format(C))||"",y.dateFormat=C}else if(P==="ecanRangePicker"){const{interval:_,intervalUnit:B}=$||{};let j=O;if(!O){const W=N==null?void 0:N.split("-");W!=null&&W.length&&(j=W[W.length-1])}if(!j)return;let v=null;if(U&&(j==="startTime"?v=ie().subtract(_,B):j==="endTime"&&(v=ie())),$[j]&&(v=ie($[j])),F){const{type:W,value:X,mode:Q}=F;switch(W){case"add":v=v&&v.add(X,Q);break;case"minus":v=v&&v.subtract(X,Q)}}v&&(y.fieldValue=v==null?void 0:v.format(C)),y.dateFormat=C}else y.fieldValue=S;p.push(y)}for(let k=p.length-1;k>=0;k--){const E=p[k];E.globalCondition||p.find(N=>N.alias===E.alias&&N.globalCondition)&&p.splice(k,1)}return p},$t=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break;case"ecanImage":o="click";break}return o};function Dn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let To=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const Mi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Ti,TruncationList:vi,AModal:M.Modal,AButton:M.Button,ATabs:M.Tabs,ATabPane:M.TabPane},setup(t,{expose:o}){var $;const n=e.ref("1"),a=()=>{var y;return`添加过滤条件-${((y=t.item)==null?void 0:y.label)||""}`},r=e.inject(pe),l=e.inject(Be),i=e.inject(Re),d=e.computed(()=>{var y;return(y=e.unref(r))==null?void 0:y.dataSourceId}),s=e.inject(ve),c=e.inject(Lt),p=e.ref([]),f=e.ref([]),u=e.ref(!1);e.watch(u,y=>{var S,V,F,P;y&&(Array.isArray((S=t.item)==null?void 0:S.conditions)&&(p.value=ne.cloneDeep((V=t.item)==null?void 0:V.conditions)||[]),Array.isArray((F=t.item)==null?void 0:F.truncations)?f.value=ne.cloneDeep((P=t.item)==null?void 0:P.truncations)||[]:f.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"});let h=!1;const w=y=>{var S;h=!0,e.unref(p)==null||((S=e.unref(p))==null?void 0:S.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==y?p.value=[{join:y,conditions:[e.unref(p)[0],{keyValue:To()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===y&&p.value[0].conditions.push({keyValue:To()}))};e.provide(Xo,{updateCondition(y,S,V){var P;h=!0;let F=e.unref(p);for(let U=0;U<S&&F[0];U++)F=(P=F[0])==null?void 0:P.conditions;Array.isArray(F)&&F[V]&&(F[V]=y)},deleteCondition(y,S){var F,P;h=!0;let V=e.unref(p);for(let U=0;U<y&&V[0];U++)V=(F=V[0])==null?void 0:F.conditions;if(Array.isArray(V)&&V[S]&&(V.splice(S,1),V.length===1)){let U=e.unref(p);const C=y-2>0?y-2:0;for(let _=0;_<C&&U[0];_++)U=(P=U[0])==null?void 0:P.conditions;U[0].join===V[0].join?U[0].conditions=[...V[0].conditions,...U[0].conditions.slice(1)]:U[0]=V[0]}}});const b=y=>{h=!0,f.value=y},k=e.computed(()=>{var S;const y=[];return(S=e.unref(i))==null||S.forEach(V=>{const{keyName:F="",id:P="",type:U}=V;U==="ecanRangePicker"?y.push({value:`${P}-startTime`,label:`${F||P}-开始时间值`,keyName:`${F||P}-startTime`},{value:`${P}-endTime`,label:`${F||P}-结束时间值`,keyName:`${F||P}-endTime`}):y.push({value:P,label:`${F||P}`,keyName:`${F||P}`})}),y}),E=()=>{var C,_;const{controlList:y=[]}=e.unref(r),S=((C=e.unref(r)[t.type])==null?void 0:C.slice())||[],V=It(ne.cloneDeep(S[t.index].conditions));S[t.index].conditions=e.unref(p),["classificationList","rowHeaderList"].includes(t.type)&&((_=e.unref(f))!=null&&_.length)&&(S[t.index].truncations=e.unref(f));const F=It(e.unref(p));for(const B of F)if(B.dataType==="component"&&B.fieldValue){const j=e.unref(k).find(v=>v.value===B.fieldValue);j&&(B.fieldValue=j.keyName)}const P=V.filter(B=>!F.find(j=>j.componentId===B.componentId)).filter(B=>!y.find(j=>j.id===B.componentId)),U=F.filter(B=>!V.find(j=>j.componentId===B.componentId));m(P,U),l({[t.type]:S,sqlConditions:Fn({...e.unref(r),[t.type]:S},e.unref(i))})};function m(y,S){var F;const V=y.map(P=>({...P,delete:!0})).concat(S.map(P=>({...P,add:!0})));for(const P of V){const U=e.unref(i).find(C=>C.id===P.componentId);if(U){const{type:C,id:_,events:B=[]}=U,j=$t(C);if(P.add)B.find(v=>{var W;return v.on===j&&v.target===((W=e.unref(s))==null?void 0:W.id)&&v.emit==="refreshData"})||c({id:_,events:[...B,{on:j,target:(F=e.unref(s))==null?void 0:F.id,emit:"refreshData"}].reverse()});else if(P.delete){const v=B.findIndex(W=>{var X;return W.on===j&&W.target===((X=e.unref(s))==null?void 0:X.id)&&W.emit==="refreshData"});v!==-1&&(B.splice(v,1),c({id:_,events:B}))}}}}const N=()=>{u.value=!0},L=()=>{p.value=[],u.value=!1},g=()=>{h&&E(),h=!1,L()},x=()=>{L()},O=e.inject(Le),A=e.unref(e.inject(Ee)),I=($=window==null?void 0:window.config)==null?void 0:$.pageId,D=e.ref([]);e.provide(Qo,D);const T=async y=>{var S;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:V,indexCode:F}=y,P=await O.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:I,dataSourceId:e.unref(d),indexGuid:V,indexCode:F},{headers:{Authentication:A,operateContext:"ygt"}}),{success:U,data:C=[]}=P.data;U&&((S=C==null?void 0:C.dataViewColumns)!=null&&S.length)&&(D.value=C.dataViewColumns)}catch(V){console.error(V)}};return e.watch(()=>t.item,y=>{y&&u.value&&T(y)}),o({showModal:N}),{visible:u,onOk:g,onCancel:x,handleTitle:a,conditionList:p,truncationList:f,addCondition:w,onUpdatetruncation:b,activeKey:n}}}),bf="",ji={class:"header"},Ri={class:"header"};function Ui(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(f,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=u=>t.activeKey=u)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",ji,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=u=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=u=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=u=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Ri,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=u=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=u=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=u=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const Gi=ee(Mi,[["render",Ui],["__scopeId","data-v-c4fb908d"]]),zi=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:M.Input,AModal:M.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Be),l=e.ref(),i=p=>{const{showLabel:f="",label:u=""}=p;l.value=f||u||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var f;const p=((f=e.unref(a)[t.type])==null?void 0:f.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),Cf="",Hi=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Wi={class:"config-name"},qi=Hi(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function Yi(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[qi,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ki=ee(zi,[["render",Yi],["__scopeId","data-v-de6a1755"]]),Xi=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:M.Select,AModal:M.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Be),l=e.inject(Re),i=e.inject(ve),d=e.inject(Lt),s=e.ref(),c=e.computed(()=>{var E;return(E=e.unref(l))==null?void 0:E.filter(m=>m.keyName!=="")});let p=[];const f=E=>{const{sortCpnts:m=[]}=E;p=ne.cloneDeep(m),s.value=ne.cloneDeep(m),n.value=!0},u=()=>{n.value=!1},h=()=>{var g;const{controlList:E=[]}=e.unref(a),m=p.filter(x=>!e.unref(s).includes(x)).filter(x=>!E.find(O=>O.id===x)),N=e.unref(s).filter(x=>!p.includes(x)).filter(x=>!E.find(O=>O.id===x)),L=m.map(x=>({componentId:x,delete:!0})).concat(N.map(x=>({componentId:x,add:!0})));for(const x of L){const O=e.unref(l).find(A=>A.id===x.componentId);if(O){const{type:A,id:I,events:D=[]}=O,T=$t(A);if(x.add)D.find($=>{var y;return $.on===T&&$.target===((y=e.unref(i))==null?void 0:y.id)&&$.emit==="refreshData"})||d({id:I,events:[...D,{on:T,target:(g=e.unref(i))==null?void 0:g.id,emit:"refreshData"}].reverse()});else if(x.delete){const $=D.findIndex(y=>{var S;return y.on===T&&y.target===((S=e.unref(i))==null?void 0:S.id)&&y.emit==="refreshData"});$!==-1&&(D.splice($,1),d({id:I,events:D}))}}}},w=()=>{var m;h();const E=((m=e.unref(a)[t.type])==null?void 0:m.slice())||[];E[t.index].sortCpnts=s.value,r({[t.type]:E}),u()},b=()=>{u()},k=(E,m)=>{var N;return(N=m==null?void 0:m.keyName)==null?void 0:N.toLowerCase().includes(E==null?void 0:E.toLowerCase())};return o({showModal:f}),{visible:n,onOk:w,onCancel:b,idFilterOption:k,fieldName:s,usedComponentList:c}}}),wf="",Qi=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),Ji={class:"sort-by-cpnt"},Zi=Qi(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function es(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[Zi,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const ts=ee(Xi,[["render",es],["__scopeId","data-v-2943f455"]]),Lo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:Lo(t,r.children)&&(n=Lo(t,r.children)))}return n},os=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:M.Row,ACol:M.Col,ATextarea:M.Textarea,APopover:M.Popover,AInputSearch:M.InputSearch,ATree:M.Tree,DoubleRightOutlined:ol},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Le),a=e.unref(e.inject(Ee)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const x=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(x==null?void 0:x.filter(O=>O.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:x=>{o("update:value",x),o("change",x)}}),f=e.ref(""),u=x=>{const O=document.getElementById("calTextArea");let A=p.value;if(document.selection){const I=document.selection.createRange();I.text=x}else if(typeof O.selectionStart=="number"&&typeof O.selectionEnd=="number"){const I=O.selectionStart,D=O.selectionEnd;let T=I;A=A.substring(0,I)+x+A.substring(D,A.length),T+=x.length,O.selectionStart=O.selectionEnd=T}else A+=x;p.value=A},h=["+","-","*","/","(",")"],w=(x,O)=>{let A="";switch(O){case"name":{A="${"+x+"}";break}case"function":{A=x+"()";break}default:A=x}u(A)},b=[],k=e.ref([]),E=e.ref(!0),m=e.ref([]),N=x=>{var O;for(const A of x)(O=A==null?void 0:A.children)!=null&&O.length?N(A.children):b.push({key:A.key,title:A.title})},L=async()=>{try{const x=await n.get(`${xe}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:O,data:A=[]}=x.data;O&&(A!=null&&A.length)&&(N(A),m.value=A)}catch(x){console.error(x)}},g=x=>{k.value=x,E.value=!1};return e.watch(f,x=>{const O=b.map(A=>A.title.indexOf(x)>-1?Lo(A.key,m.value):null).filter((A,I,D)=>A&&D.indexOf(A)===I);k.value=O,f.value=x,E.value=!0}),e.onMounted(()=>{L()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:m,searchFuncValue:f,expandedKeys:k,autoExpandParent:E,selectedElem:w,onExpand:g}}}),xf="",kf="",ns={class:"formula-calculation"},as={class:"field-area"},rs=["onClick"],ls={class:"cal_right_bottom"},is={class:"cal_fu"},ss=["onClick"],cs={class:"function-wrap"},ds={class:"wrap-search"},ps={class:"tree-box"},fs={key:0},us={style:{color:"#f50"}},ms={key:1},hs=["onClick"],ys={class:"cal_a"};function gs(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),f=e.resolveComponent("a-popover"),u=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",ns,[e.createVNode(u,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:b=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,rs))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ls,[e.createElementVNode("ul",is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:b=>t.selectedElem(h,"symbol"),key:w},e.toDisplayString(h),9,ss))),128))]),e.createVNode(f,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",cs,[e.createElementVNode("div",ds,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",ps,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:w})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",fs,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",us,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",ms,e.toDisplayString(h),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:b=>t.selectedElem(h,"function")},"插入",8,hs)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",ys,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const bs=ee(os,[["render",gs],["__scopeId","data-v-1e6dd439"]]),Cs=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:bs,AForm:M.Form,AModal:M.Modal,AFormItem:M.FormItem,AInput:M.Input,ASelect:M.Select,ASelectOption:M.SelectOption,ATextarea:M.Textarea},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(Re),a=e.inject(pe),r=e.inject(Be),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const T=["leftAxisList","rightAxisList","queryColumnList","indicators"];let $=[];for(const y of T)Object.prototype.hasOwnProperty.call(e.unref(a),y)&&($=$.concat(e.unref(a)[y]));return $}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},f=e.ref(),u=e.ref(!1),h=e.ref();e.watch(u,T=>{if(T)if(t.mode==="edit"){const{label:$,calcType:y,formula:S,builtInValueSource:V,builtInFormula:F,builtInCalcWay:P}=t.item;h.value={label:$,calcType:y,formula:S,builtInValueSource:V,builtInFormula:F,builtInCalcWay:P}}else t.mode==="add"&&(h.value=ne.cloneDeep(p));else h.value=ne.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!T)},{immediate:!0,deep:!0});let w=!1;const b=()=>{w=!0},k=T=>{const $=e.unref(l).find(y=>y.id===T);$&&(h.value.builtInCalcWay=$.keyName),w=!0},E=()=>{var y;const T=((y=e.unref(a)[t.type])==null?void 0:y.slice())||[],{label:$}=e.unref(h)||{};if(t.mode==="add"){const S=To();T.push({...e.unref(h),id:S,show:!0,name:$})}else t.mode==="edit"&&(T[t.index]={...T[t.index],...e.unref(h),name:$});r({[t.type]:T})},m=()=>{u.value=!0},N=()=>{u.value=!1},L=async(T,$)=>{if($==="")return Promise.reject(new Error("请输入指标名"));{const y=e.unref(d).find(S=>S.label===$);return y?y.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},g=e.computed(()=>{let T={label:[{required:!0,validator:L,trigger:"change"}]};return h.value.calcType==="BUILT_IN"&&(T={...T,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),T}),x=()=>{f.value.validate().then(()=>{w&&E(),w=!1,N()})},O=()=>{f.value.clearValidate(),N()},A=()=>{w=!0,e.unref(h).builtInCalcWay=""},I=e.computed(()=>{let T="";const $=e.unref(h).builtInCalcWay,y=e.unref(h).builtInValueSource;if(!y||!$)return T;switch(e.unref(h).builtInFormula){case"BUILT_IN_RANK":{$==="ASC"?T="【"+y+"】由小到大在所有值中的排名":T="【"+y+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{T=`所有【】的
60
- `,$==="ASC"?T=T+"【"+y+"】由小到大的组内的排名":T=T+"【"+y+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let S="";switch($){case"SUM":{S="求和";break}case"AVG":{S="求平均值";break}case"MIN":{S="求最小值";break}case"MAX":{S="求最大值";break}}T="将所有【"+y+"】"+S;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let S="";switch(T=`所有【】的
61
- `,$){case"SUM":{S="求和";break}case"AVG":{S="求平均值";break}case"MIN":{S="求最小值";break}case"MAX":{S="求最大值";break}}T=T+"将所有【"+y+"】"+S;break}}return T}),D=(T,$)=>$.keyName.toLowerCase().indexOf(T.toLowerCase())>=0;return o({showModal:m}),{visible:u,onCancel:O,labelCol:s,wrapperCol:c,formState:h,builtInValueSourceList:i,onOK:x,onChange:b,formRules:g,accessLogic:I,formRef:f,onChangeBuiltInFormula:A,componentList:l,onChangeComponent:k,filterOption:D}}}),_f="",ws={key:0,class:"accesstip"};function xs(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),f=e.resolveComponent("a-textarea"),u=e.resolveComponent("a-form"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(u,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=w=>t.formState.label=w),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=w=>t.formState.calcType=w),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=w=>t.formState.formula=w),item:t.item,onChange:t.onChange},null,8,["value","item","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=w=>t.formState.builtInFormula=w),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=w=>t.formState.builtInValueSource=w),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(w,b)=>(e.openBlock(),e.createBlock(s,{key:b,value:w.label,disabled:t.item.label===w.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=w=>t.formState.builtInCalcWay=w),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",ws," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(f,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=w=>t.formState.builtInValueSource=w),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const ks=ee(Cs,[["render",xs],["__scopeId","data-v-934b2c09"]]),_s=e.defineComponent({name:"DataConfigCard",directives:{focus:In},components:{CalculationModal:ks,FilterModal:Gi,CustomGroupModal:Zl,SettingOutlined:kl,DeleteOutlined:Jr,CopyOutlined:Yr,CustomSortModal:jl,PlusOutlined:bl,ACard:M.Card,ACheckbox:M.Checkbox,AInput:M.Input,ADropdown:M.Dropdown,AMenu:M.Menu,ASubMenu:M.SubMenu,AMenuItem:M.MenuItem,AMenuDivider:M.MenuDivider,ASelect:M.Select,Draggable:pt,ConfigName:Ki,SortByCpnt:ts},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(pe),a=e.inject(Be),r=["leftAxisList","rightAxisList","indicators","queryColumnList"],l=["classificationList","seriesList","rowHeaderList","queryColumnList"],i=e.inject(Zt),d=(G={})=>{if(e.unref(i)==="SQL_VIEW")return!0;let z=!1;return G.scope==="IDX"?r.includes(t.type)&&(z=!0):["DIM","BUILT_IN_DIM"].includes(G.scope)&&l.includes(t.type)&&(z=!0),z},s=(G="{}")=>{var z;try{const q=JSON.parse(G);if(!d(q))return;const K=((z=e.unref(n)[t.type])==null?void 0:z.slice())||[];["classificationList","seriesList"].includes(t.type)&&K.forEach(se=>{se.show=!1}),p(K,q),K.push(q),a({[t.type]:K}),sessionStorage.setItem("indicator-list-item","")}catch(q){console.error(q)}},c=(G="{}")=>{var z;try{const{cardItem:q,type:K,index:se}=JSON.parse(G);if(!d(q)||K===t.type)return;const re=((z=e.unref(n)[t.type])==null?void 0:z.slice())||[];p(re,q),re.push(q);const oe=e.unref(n)[K].slice()||[];oe.splice(se,1),a({[t.type]:re,[K]:oe})}catch(q){console.error(q)}};function p(G,z){const q=[];if(G.forEach(K=>{K.label.includes(z.label)&&q.push(K.label.split(z.label)[1])}),q.length>=1){for(let K=1;K<=q.length;K++)if(!q.includes(K+"")){z.label=z.label+K;break}}}const f=(G,z)=>{var se,re;const q=(se=G.target)==null?void 0:se.checked,K=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[];["classificationList","seriesList"].includes(t.type)&&K.forEach(oe=>{oe.show=!1}),K[z].show=q,a({[t.type]:K})},u=G=>{var q;const z=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];z.splice(G,1),a({[t.type]:z})},h=()=>{sessionStorage.setItem("indicator-card-item","")},w=()=>{const G=sessionStorage.getItem("indicator-list-item"),z=sessionStorage.getItem("indicator-card-item");G?s(G):z&&c(z)},b=G=>{var we,Ze;const{newIndex:z,oldIndex:q,from:K,to:se}=G,re=K.id,oe=se.id;if(z>=0&&q>=0){if(re===oe){const ae=((we=e.unref(n)[t.type])==null?void 0:we.slice())||[],de=ae.splice(q,1)[0];de&&(ae.splice(z,0,de),a({[t.type]:ae}))}else if(t.type===oe){const ae=((Ze=e.unref(n)[oe])==null?void 0:Ze.slice())||[];if(ae!=null&&ae.length){const de=ae.splice(ae.length-1,1)[0];de&&(ae.splice(z,0,de),a({[t.type]:ae}))}}}},k=(G,z)=>{const q=G.oldIndex,K=z[q];K&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:K,type:t.type,index:q}))},E=e.computed(()=>e.unref(n)[t.type]||[]),m=e.ref([]);let N=!1;e.watch(()=>e.unref(E).length,G=>{m.value=new Array(G).fill(!1)},{flush:"post",immediate:!0});const L=G=>{var q;const z=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];z.splice(G,1),a({[t.type]:z})},g=G=>{m.value[G]=!0},x=()=>{N=!0},O=(G,z,q)=>{var K,se;if(m.value[z]=!1,N){const re=(K=G.target)==null?void 0:K.value,oe=((se=e.unref(n)[t.type])==null?void 0:se.slice())||[],we=oe.filter(ae=>{var de;return(de=ae==null?void 0:ae.formula)==null?void 0:de.includes(q)}).map(ae=>ae.id),Ze=oe.filter(ae=>{var de;return(de=ae==null?void 0:ae.builtInValueSource)==null?void 0:de.includes(q)}).map(ae=>ae.id);if(we!=null&&we.length)for(const ae of we){const de=oe.find(zo=>zo.id===ae);de.formula=de.formula.replaceAll(q,re)}if(Ze!=null&&Ze.length)for(const ae of Ze){const de=oe.find(zo=>zo.id===ae);de.builtInValueSource=de.builtInValueSource.replaceAll(q,re)}oe[z].label=re,a({[t.type]:oe})}N=!1},A="DEFAULT",I=e.computed(()=>{const G=e.unref(n)[t.type]||[],{leftAxisList:z=[],rightAxisList:q=[],indicators:K=[]}=e.unref(n)||{};return[{id:A,label:"默认",name:"默认"},...G,...z,...q,...K]}),D=(G={},z,q="ASC")=>{var we;const{label:K,name:se,id:re}=G,oe=((we=e.unref(n)[t.type])==null?void 0:we.slice())||[];re===A?delete oe[z].sort:oe[z].sort={label:K,columnName:se,type:"NORMAL",order:q},a({[t.type]:oe})},T=(G={},z="ASC")=>{const K={ASC:"升序",DESC:"降序"}[z],{sort:se}=G,{label:re,order:oe}=se||{};return re&&oe===z?`${K}(${re})`:K},$=e.ref(),y=e.ref(),S=e.ref(),V=e.ref(),F=(G={},z)=>{var q;$.value=G,y.value=z,(q=e.unref(S))==null||q.showModal()},P=G=>{var z;return"自定义排序"+(((z=G==null?void 0:G.sort)==null?void 0:z.type)==="CUSTOM"?"(已配置)":"")},U=(G={},z)=>{var q;$.value=G,y.value=z,(q=e.unref(V))==null||q.showModal()},C=G=>"自定义分组"+((G==null?void 0:G.customGroup)!=null?"(已配置)":""),_=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],B=(G,z)=>{var K;const q=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];q[z].aggregate=G,a({[t.type]:q})},j=(G,z)=>{var K;const q=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];q[z].dateFormat=G,a({[t.type]:q})},v=(G="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[G]})`,W=(G={})=>{var z;return"过滤"+(G!=null&&G.conditions&&((z=G==null?void 0:G.conditions)==null?void 0:z.length)>0?"(已配置)":"")},X=e.ref(),Q=e.ref(),te=e.ref(),le=(G={},z)=>{$.value=G,y.value=z,e.unref(X).showModal()},fe=(G={},z)=>{$.value=G,y.value=z,e.unref(Q).showModal(G)},ue=(G={},z)=>{$.value=G,y.value=z,e.unref(te).showModal(G)},Ie=e.ref(),Ye=e.ref("add"),Ke=(G,z,q)=>{var K;Ye.value=G,G==="edit"&&($.value=z,y.value=q),(K=e.unref(Ie))==null||K.showModal()},Xe=e.inject(Le),Qe=e.unref(e.inject(Ee)),ze=e.ref([]),Je=e.computed(()=>e.unref(n)[t.type]||{}),ct=async()=>{try{const G=await Xe.post(`${xe}/diagram/dimFields`,{},{headers:{Authentication:Qe,operateContext:"ygt"}}),{success:z,data:q=[]}=G.data;z&&(ze.value=q)}catch(G){console.error(G)}},dt=(G,z)=>{const q=e.unref(n)[t.type]||{};q[z]=G,a({[t.type]:q})},R=["classificationList","seriesList","rowHeaderList"],H=e.ref({}),Y=async(G,z)=>{var K;const{name:q}=z;if(!R.includes(t.type)&&G&&No(z,"indexCode")){const se=await Xe.post(`${xe}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:z.id,indexCode:z.indexCode,pageId:(K=window==null?void 0:window.config)==null?void 0:K.pageId},{headers:{Authentication:Qe,operateContext:"ygt"}}),{success:re,data:oe}=se.data;re&&oe&&(H.value[q]={name:oe.name,code:oe.indexCode})}},J=G=>{const z=document.createElement("input");document.body.appendChild(z),z.setAttribute("value",G),z.select(),document.execCommand("copy"),document.body.removeChild(z),M.message.success("复制成功")},Z=e.inject(ve),ce=e.computed(()=>t.type==="indicators"&&e.unref(Z).type==="ecanTable"),ge=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&ct()}),{onCheckboxChange:f,onDropEnd:u,onDragItemEnd:h,onDragItemAdd:w,onDragItemSort:b,onDragItemStart:k,cardItemList:E,onDelete:L,onEdit:g,onCommitLabelChange:O,sortList:I,onSort:D,handleSortTitle:T,showCustomSortModal:F,customSortModalRef:S,currentItem:$,currentIndex:y,handleCustomSortTitle:P,handleCustomGroupTitle:C,customGroupModalRef:V,showCustomGroupModal:U,editLabelList:m,onLabelChange:x,aggregateList:_,onAggregateChange:B,onDateFormatChange:j,handleAggregateTitle:v,onShowCalculationModal:Ke,handleFilterTitle:W,filterModalRef:X,configNameRef:Q,sortByCpntRef:te,showFilterModal:le,calculationModalRef:Ie,calculationModalMode:Ye,formatList:o,fieldOptions:ze,fieldData:Je,onFieldChange:dt,onVisibleChange:Y,copyDataViewName:J,dataViewMap:H,isShowConfigName:ce,showConfigNameModal:fe,dimensionType:R,isShowSortByCpnt:ge,showSortByCpntModal:ue}}}),Sf="",Af="",ht=t=>(e.pushScopeId("data-v-1afad82f"),t=t(),e.popScopeId(),t),Ss={class:"title"},As={class:"title-text"},Ns={class:"field-wrap"},Ts={class:"field-item"},Ls=ht(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Es={class:"field-item"},Bs=ht(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Os={class:"title"},Vs={class:"title-text"},Is=ht(()=>e.createElementVNode("span",null,"添加计算指标",-1)),$s={class:"card-item-wrap"},Fs={class:"card-item-inner"},Ds=["onClick"],vs=["onClick"],Ps=["onClick"],Ms={style:{display:"flex","align-items":"center"}},js=["title"],Rs=ht(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Us={style:{display:"flex","align-items":"center"}},Gs=["title"],zs=ht(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Hs(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("plus-outlined"),c=e.resolveComponent("a-input"),p=e.resolveComponent("setting-outlined"),f=e.resolveComponent("a-menu-item"),u=e.resolveComponent("a-sub-menu"),h=e.resolveComponent("a-menu-divider"),w=e.resolveComponent("copy-outlined"),b=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),E=e.resolveComponent("delete-outlined"),m=e.resolveComponent("a-checkbox"),N=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),g=e.resolveComponent("custom-group-modal"),x=e.resolveComponent("filter-modal"),O=e.resolveComponent("config-name"),A=e.resolveComponent("sort-by-cpnt"),I=e.resolveComponent("calculation-modal"),D=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Ss,[e.createElementVNode("div",As,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Ns,[e.createElementVNode("div",Ts,[Ls,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=T=>t.onFieldChange(T,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Es,[Bs,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=T=>t.onFieldChange(T,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Os,[e.createElementVNode("div",Vs,e.toDisplayString(t.title),1),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(T=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(s,{class:"add-calculation-icon"}),Is]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(N,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=T=>t.cardItemList=T),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=T=>t.onDragItemStart(T,t.cardItemList))},{item:e.withCtx(({element:T,index:$})=>[e.createElementVNode("div",$s,[e.createVNode(m,{class:"card-item",checked:T.show,onChange:y=>t.onCheckboxChange(y,$)},{default:e.withCtx(()=>[e.createElementVNode("div",Fs,[!t.editLabelList[$]&&T.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(y=>t.onEdit($),["prevent","stop"])},e.toDisplayString(T.label),9,Ds)):e.createCommentVNode("",!0),!t.editLabelList[$]&&!T.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(y=>t.onEdit($),["prevent","stop"])}," 请点击填入名字 ",8,vs)):e.createCommentVNode("",!0),t.editLabelList[$]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:2,"default-value":T.label,size:"small",onBlur:y=>t.onCommitLabelChange(y,$,T.label),onPressEnter:y=>t.onCommitLabelChange(y,$,T.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[D]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(T.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(y=>t.onShowCalculationModal("edit",T,$),["prevent","stop"])}," fx ",8,Ps)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:y=>t.onVisibleChange(y,T)},{overlay:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(u,{title:t.handleSortTitle(T,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,y=>(e.openBlock(),e.createBlock(f,{style:{"white-space":"nowrap"},key:y.id,onClick:S=>t.onSort(y,$,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(u,{title:t.handleSortTitle(T,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,y=>(e.openBlock(),e.createBlock(f,{class:"menu-item",style:{"white-space":"nowrap"},key:y.id,onClick:S=>t.onSort(y,$,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f,{onClick:y=>t.showCustomSortModal(T,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(T)),1)]),_:2},1032,["onClick"]),e.createVNode(h),e.createVNode(f,{onClick:y=>t.showCustomGroupModal(T,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(T)),1)]),_:2},1032,["onClick"]),e.createVNode(h),T.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(u,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,y=>(e.openBlock(),e.createBlock(f,{style:{"white-space":"nowrap"},key:y.value,onClick:S=>t.onDateFormatChange(y.value,$)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(T.dateFormat===y.value||!T.dateFormat&&y.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(y.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(h)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(f,{onClick:y=>t.showFilterModal(T,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(T)),1)]),_:2},1032,["onClick"]),e.createVNode(h),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{title:t.handleAggregateTitle(T.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,y=>(e.openBlock(),e.createBlock(f,{style:{"white-space":"nowrap"},key:y.value,onClick:S=>t.onAggregateChange(y.value,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(f,{onClick:y=>t.showConfigNameModal(T,$)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(h)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(f,{onClick:y=>t.showSortByCpntModal(T,$)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(h)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[t.dataViewMap[T.name]?(e.openBlock(),e.createBlock(f,{key:0,onClick:y=>t.copyDataViewName(t.dataViewMap[T.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[T.name].name},[Rs,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[T.name].name),1)],8,js),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[T.name]?(e.openBlock(),e.createBlock(f,{key:1,onClick:y=>t.copyDataViewName(t.dataViewMap[T.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[T.name].code},[zs,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[T.name].code),1)],8,Gs),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(p,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(E,{class:"delete-icon",onClick:e.withModifiers(y=>t.onDelete($),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(g,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(x,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(O,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(A,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(I,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const Ws=ee(_s,[["render",Hs],["__scopeId","data-v-1afad82f"]]),qs={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"}},Ys=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Ws},setup(){const t=e.inject(ve),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Be),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var k,E;const s=ne.cloneDeep((k=e.unref(t))==null?void 0:k.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList"],text:["indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"]},f="ecan";let u=e.unref(o);if(u.startsWith(f)){const m=f.length;u=((E=u.slice(m,m+1))==null?void 0:E.toLowerCase())+u.slice(m+1)}const h=p[u],w=qs,b=(h==null?void 0:h.length)||0;for(let m=0;m<b;m++){const N=h[m];if(!N)break;r.push({...w[N],type:N})}for(const m of c)i(s,m)&&!h.find(N=>N===m)&&(s[m]=[]);l(s)})(),{cardsMap:a,cards:r}}}),Nf="",Tf="",Ks={class:"data-group"};function Xs(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Qs=ee(Ys,[["render",Xs],["__scopeId","data-v-9b00f715"]]),Js=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Zs={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},ec=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:M.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function tc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const oc=ee(ec,[["render",tc]]),nc=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:M.InputNumber,ASelect:M.Select,ASelectOption:M.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const f=t.value;return typeof f=="string"?parseFloat(f):typeof f=="object"&&f!=null?f[t.valueKey]:f}),a=f=>t.value!=null&&typeof t.value=="object"?t.value[t[`${f}ValueKey`]]:Array.isArray(t[f])?t[f][0]&&t[f][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:f=>{const u=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:f,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):u===""||f==null?o("change",f):o("change",`${f}${u}`)},parser:f=>typeof t.suffix=="string"?f.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?f.replace(t.value[t.suffixValueKey],""):f,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function ac(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},f)=>(e.openBlock(),e.createBlock(i,{key:f,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},f)=>(e.openBlock(),e.createBlock(i,{key:f,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const vn=ee(nc,[["render",ac]]),rc=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:M.RadioGroup,ARadioButton:M.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function lc(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const ic=ee(rc,[["render",lc]]),sc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:M.Select,ASelectOption:M.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function cc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const dc=ee(sc,[["render",cc]]),pc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:M.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function fc(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const uc=ee(pc,[["render",fc]]);var he="top",Se="bottom",Ae="right",ye="left",Eo="auto",yt=[he,Se,Ae,ye],ot="start",gt="end",mc="clippingParents",Pn="viewport",bt="popper",hc="reference",Mn=yt.reduce(function(t,o){return t.concat([o+"-"+ot,o+"-"+gt])},[]),jn=[].concat(yt,[Eo]).reduce(function(t,o){return t.concat([o,o+"-"+ot,o+"-"+gt])},[]),yc="beforeRead",gc="read",bc="afterRead",Cc="beforeMain",wc="main",xc="afterMain",kc="beforeWrite",_c="write",Sc="afterWrite",Ac=[yc,gc,bc,Cc,wc,xc,kc,_c,Sc];function $e(t){return t?(t.nodeName||"").toLowerCase():null}function Ce(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function He(t){var o=Ce(t).Element;return t instanceof o||t instanceof Element}function Ne(t){var o=Ce(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Bo(t){if(typeof ShadowRoot>"u")return!1;var o=Ce(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Nc(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Ne(l)||!$e(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function Tc(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Ne(r)||!$e(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const Lc={name:"applyStyles",enabled:!0,phase:"write",fn:Nc,effect:Tc,requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var We=Math.max,Ft=Math.min,nt=Math.round;function Oo(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function Rn(){return!/^((?!chrome|android).)*safari/i.test(Oo())}function at(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Ne(t)&&(r=t.offsetWidth>0&&nt(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&nt(a.height)/t.offsetHeight||1);var i=He(t)?Ce(t):window,d=i.visualViewport,s=!Rn()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,f=a.width/r,u=a.height/l;return{width:f,height:u,top:p,right:c+f,bottom:p+u,left:c,x:c,y:p}}function Vo(t){var o=at(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(o.width-n)<=1&&(n=o.width),Math.abs(o.height-a)<=1&&(a=o.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function Un(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Bo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Me(t){return Ce(t).getComputedStyle(t)}function Ec(t){return["table","td","th"].indexOf($e(t))>=0}function Ge(t){return((He(t)?t.ownerDocument:t.document)||window.document).documentElement}function Dt(t){return $e(t)==="html"?t:t.assignedSlot||t.parentNode||(Bo(t)?t.host:null)||Ge(t)}function Gn(t){return!Ne(t)||Me(t).position==="fixed"?null:t.offsetParent}function Bc(t){var o=/firefox/i.test(Oo()),n=/Trident/i.test(Oo());if(n&&Ne(t)){var a=Me(t);if(a.position==="fixed")return null}var r=Dt(t);for(Bo(r)&&(r=r.host);Ne(r)&&["html","body"].indexOf($e(r))<0;){var l=Me(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Ct(t){for(var o=Ce(t),n=Gn(t);n&&Ec(n)&&Me(n).position==="static";)n=Gn(n);return n&&($e(n)==="html"||$e(n)==="body"&&Me(n).position==="static")?o:n||Bc(t)||o}function Io(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wt(t,o,n){return We(t,Ft(o,n))}function Oc(t,o,n){var a=wt(t,o,n);return a>n?n:a}function zn(){return{top:0,right:0,bottom:0,left:0}}function Hn(t){return Object.assign({},zn(),t)}function Wn(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Vc=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,Hn(typeof o!="number"?o:Wn(o,yt))};function Ic(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=Fe(n.placement),s=Io(d),c=[ye,Ae].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var f=Vc(r.padding,n),u=Vo(l),h=s==="y"?he:ye,w=s==="y"?Se:Ae,b=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],k=i[s]-n.rects.reference[s],E=Ct(l),m=E?s==="y"?E.clientHeight||0:E.clientWidth||0:0,N=b/2-k/2,L=f[h],g=m-u[p]-f[w],x=m/2-u[p]/2+N,O=wt(L,x,g),A=s;n.modifiersData[a]=(o={},o[A]=O,o.centerOffset=O-x,o)}}function $c(t){var o=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=o.elements.popper.querySelector(r),!r)||Un(o.elements.popper,r)&&(o.elements.arrow=r))}const Fc={name:"arrow",enabled:!0,phase:"main",fn:Ic,effect:$c,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rt(t){return t.split("-")[1]}var Dc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vc(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:nt(n*r)/r||0,y:nt(a*r)/r||0}}function qn(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,f=t.isFixed,u=i.x,h=u===void 0?0:u,w=i.y,b=w===void 0?0:w,k=typeof p=="function"?p({x:h,y:b}):{x:h,y:b};h=k.x,b=k.y;var E=i.hasOwnProperty("x"),m=i.hasOwnProperty("y"),N=ye,L=he,g=window;if(c){var x=Ct(n),O="clientHeight",A="clientWidth";if(x===Ce(n)&&(x=Ge(n),Me(x).position!=="static"&&d==="absolute"&&(O="scrollHeight",A="scrollWidth")),x=x,r===he||(r===ye||r===Ae)&&l===gt){L=Se;var I=f&&x===g&&g.visualViewport?g.visualViewport.height:x[O];b-=I-a.height,b*=s?1:-1}if(r===ye||(r===he||r===Se)&&l===gt){N=Ae;var D=f&&x===g&&g.visualViewport?g.visualViewport.width:x[A];h-=D-a.width,h*=s?1:-1}}var T=Object.assign({position:d},c&&Dc),$=p===!0?vc({x:h,y:b},Ce(n)):{x:h,y:b};if(h=$.x,b=$.y,s){var y;return Object.assign({},T,(y={},y[L]=m?"0":"",y[N]=E?"0":"",y.transform=(g.devicePixelRatio||1)<=1?"translate("+h+"px, "+b+"px)":"translate3d("+h+"px, "+b+"px, 0)",y))}return Object.assign({},T,(o={},o[L]=m?b+"px":"",o[N]=E?h+"px":"",o.transform="",o))}function Pc(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:Fe(o.placement),variation:rt(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:r,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,qn(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,qn(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Mc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pc,data:{}};var vt={passive:!0};function jc(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=Ce(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,vt)}),d&&s.addEventListener("resize",n.update,vt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,vt)}),d&&s.removeEventListener("resize",n.update,vt)}}const Rc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jc,data:{}};var Uc={left:"right",right:"left",bottom:"top",top:"bottom"};function Pt(t){return t.replace(/left|right|bottom|top/g,function(o){return Uc[o]})}var Gc={start:"end",end:"start"};function Yn(t){return t.replace(/start|end/g,function(o){return Gc[o]})}function $o(t){var o=Ce(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Fo(t){return at(Ge(t)).left+$o(t).scrollLeft}function zc(t,o){var n=Ce(t),a=Ge(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Rn();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Fo(t),y:s}}function Hc(t){var o,n=Ge(t),a=$o(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=We(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=We(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Fo(t),s=-a.scrollTop;return Me(r||n).direction==="rtl"&&(d+=We(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Do(t){var o=Me(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Kn(t){return["html","body","#document"].indexOf($e(t))>=0?t.ownerDocument.body:Ne(t)&&Do(t)?t:Kn(Dt(t))}function xt(t,o){var n;o===void 0&&(o=[]);var a=Kn(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=Ce(a),i=r?[l].concat(l.visualViewport||[],Do(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(xt(Dt(i)))}function vo(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Wc(t,o){var n=at(t,!1,o==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Xn(t,o,n){return o===Pn?vo(zc(t,n)):He(o)?Wc(o,n):vo(Hc(Ge(t)))}function qc(t){var o=xt(Dt(t)),n=["absolute","fixed"].indexOf(Me(t).position)>=0,a=n&&Ne(t)?Ct(t):t;return He(a)?o.filter(function(r){return He(r)&&Un(r,a)&&$e(r)!=="body"}):[]}function Yc(t,o,n,a){var r=o==="clippingParents"?qc(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=Xn(t,c,a);return s.top=We(p.top,s.top),s.right=Ft(p.right,s.right),s.bottom=Ft(p.bottom,s.bottom),s.left=We(p.left,s.left),s},Xn(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Qn(t){var o=t.reference,n=t.element,a=t.placement,r=a?Fe(a):null,l=a?rt(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case he:s={x:i,y:o.y-n.height};break;case Se:s={x:i,y:o.y+o.height};break;case Ae:s={x:o.x+o.width,y:d};break;case ye:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?Io(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case ot:s[c]=s[c]-(o[p]/2-n[p]/2);break;case gt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function kt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?mc:d,c=n.rootBoundary,p=c===void 0?Pn:c,f=n.elementContext,u=f===void 0?bt:f,h=n.altBoundary,w=h===void 0?!1:h,b=n.padding,k=b===void 0?0:b,E=Hn(typeof k!="number"?k:Wn(k,yt)),m=u===bt?hc:bt,N=t.rects.popper,L=t.elements[w?m:u],g=Yc(He(L)?L:L.contextElement||Ge(t.elements.popper),s,p,i),x=at(t.elements.reference),O=Qn({reference:x,element:N,strategy:"absolute",placement:r}),A=vo(Object.assign({},N,O)),I=u===bt?A:x,D={top:g.top-I.top+E.top,bottom:I.bottom-g.bottom+E.bottom,left:g.left-I.left+E.left,right:I.right-g.right+E.right},T=t.modifiersData.offset;if(u===bt&&T){var $=T[r];Object.keys(D).forEach(function(y){var S=[Ae,Se].indexOf(y)>=0?1:-1,V=[he,Se].indexOf(y)>=0?"y":"x";D[y]+=$[V]*S})}return D}function Kc(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?jn:s,p=rt(a),f=p?d?Mn:Mn.filter(function(w){return rt(w)===p}):yt,u=f.filter(function(w){return c.indexOf(w)>=0});u.length===0&&(u=f);var h=u.reduce(function(w,b){return w[b]=kt(t,{placement:b,boundary:r,rootBoundary:l,padding:i})[Fe(b)],w},{});return Object.keys(h).sort(function(w,b){return h[w]-h[b]})}function Xc(t){if(Fe(t)===Eo)return[];var o=Pt(t);return[Yn(t),o,Yn(o)]}function Qc(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,f=n.rootBoundary,u=n.altBoundary,h=n.flipVariations,w=h===void 0?!0:h,b=n.allowedAutoPlacements,k=o.options.placement,E=Fe(k),m=E===k,N=s||(m||!w?[Pt(k)]:Xc(k)),L=[k].concat(N).reduce(function(W,X){return W.concat(Fe(X)===Eo?Kc(o,{placement:X,boundary:p,rootBoundary:f,padding:c,flipVariations:w,allowedAutoPlacements:b}):X)},[]),g=o.rects.reference,x=o.rects.popper,O=new Map,A=!0,I=L[0],D=0;D<L.length;D++){var T=L[D],$=Fe(T),y=rt(T)===ot,S=[he,Se].indexOf($)>=0,V=S?"width":"height",F=kt(o,{placement:T,boundary:p,rootBoundary:f,altBoundary:u,padding:c}),P=S?y?Ae:ye:y?Se:he;g[V]>x[V]&&(P=Pt(P));var U=Pt(P),C=[];if(l&&C.push(F[$]<=0),d&&C.push(F[P]<=0,F[U]<=0),C.every(function(W){return W})){I=T,A=!1;break}O.set(T,C)}if(A)for(var _=w?3:1,B=function(X){var Q=L.find(function(te){var le=O.get(te);if(le)return le.slice(0,X).every(function(fe){return fe})});if(Q)return I=Q,"break"},j=_;j>0;j--){var v=B(j);if(v==="break")break}o.placement!==I&&(o.modifiersData[a]._skip=!0,o.placement=I,o.reset=!0)}}const Jc={name:"flip",enabled:!0,phase:"main",fn:Qc,requiresIfExists:["offset"],data:{_skip:!1}};function Jn(t,o,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-o.height-n.y,right:t.right-o.width+n.x,bottom:t.bottom-o.height+n.y,left:t.left-o.width-n.x}}function Zn(t){return[he,Ae,Se,ye].some(function(o){return t[o]>=0})}function Zc(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=kt(o,{elementContext:"reference"}),d=kt(o,{altBoundary:!0}),s=Jn(i,a),c=Jn(d,r,l),p=Zn(s),f=Zn(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:f},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const ed={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zc};function td(t,o,n){var a=Fe(t),r=[ye,he].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[ye,Ae].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function od(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=jn.reduce(function(p,f){return p[f]=td(f,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const nd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:od};function ad(t){var o=t.state,n=t.name;o.modifiersData[n]=Qn({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const rd={name:"popperOffsets",enabled:!0,phase:"read",fn:ad,data:{}};function ld(t){return t==="x"?"y":"x"}function id(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,f=n.padding,u=n.tether,h=u===void 0?!0:u,w=n.tetherOffset,b=w===void 0?0:w,k=kt(o,{boundary:s,rootBoundary:c,padding:f,altBoundary:p}),E=Fe(o.placement),m=rt(o.placement),N=!m,L=Io(E),g=ld(L),x=o.modifiersData.popperOffsets,O=o.rects.reference,A=o.rects.popper,I=typeof b=="function"?b(Object.assign({},o.rects,{placement:o.placement})):b,D=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),T=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,$={x:0,y:0};if(x){if(l){var y,S=L==="y"?he:ye,V=L==="y"?Se:Ae,F=L==="y"?"height":"width",P=x[L],U=P+k[S],C=P-k[V],_=h?-A[F]/2:0,B=m===ot?O[F]:A[F],j=m===ot?-A[F]:-O[F],v=o.elements.arrow,W=h&&v?Vo(v):{width:0,height:0},X=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:zn(),Q=X[S],te=X[V],le=wt(0,O[F],W[F]),fe=N?O[F]/2-_-le-Q-D.mainAxis:B-le-Q-D.mainAxis,ue=N?-O[F]/2+_+le+te+D.mainAxis:j+le+te+D.mainAxis,Ie=o.elements.arrow&&Ct(o.elements.arrow),Ye=Ie?L==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,Ke=(y=T==null?void 0:T[L])!=null?y:0,Xe=P+fe-Ke-Ye,Qe=P+ue-Ke,ze=wt(h?Ft(U,Xe):U,P,h?We(C,Qe):C);x[L]=ze,$[L]=ze-P}if(d){var Je,ct=L==="x"?he:ye,dt=L==="x"?Se:Ae,R=x[g],H=g==="y"?"height":"width",Y=R+k[ct],J=R-k[dt],Z=[he,ye].indexOf(E)!==-1,ce=(Je=T==null?void 0:T[g])!=null?Je:0,ge=Z?Y:R-O[H]-A[H]-ce+D.altAxis,G=Z?R+O[H]+A[H]-ce-D.altAxis:J,z=h&&Z?Oc(ge,R,G):wt(h?ge:Y,R,h?G:J);x[g]=z,$[g]=z-R}o.modifiersData[a]=$}}const sd={name:"preventOverflow",enabled:!0,phase:"main",fn:id,requiresIfExists:["offset"]};function cd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dd(t){return t===Ce(t)||!Ne(t)?$o(t):cd(t)}function pd(t){var o=t.getBoundingClientRect(),n=nt(o.width)/t.offsetWidth||1,a=nt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function fd(t,o,n){n===void 0&&(n=!1);var a=Ne(o),r=Ne(o)&&pd(o),l=Ge(o),i=at(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&(($e(o)!=="body"||Do(l))&&(d=dd(o)),Ne(o)?(s=at(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=Fo(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function ud(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function md(t){var o=ud(t);return Ac.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function hd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function yd(t){var o=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(o).map(function(n){return o[n]})}var ea={placement:"bottom",modifiers:[],strategy:"absolute"};function ta(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return!o.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function gd(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?ea:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},ea,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},f=[],u=!1,h={state:p,setOptions:function(E){var m=typeof E=="function"?E(p.options):E;b(),p.options=Object.assign({},l,p.options,m),p.scrollParents={reference:He(d)?xt(d):d.contextElement?xt(d.contextElement):[],popper:xt(s)};var N=md(yd([].concat(a,p.options.modifiers)));return p.orderedModifiers=N.filter(function(L){return L.enabled}),w(),h.update()},forceUpdate:function(){if(!u){var E=p.elements,m=E.reference,N=E.popper;if(ta(m,N)){p.rects={reference:fd(m,Ct(N),p.options.strategy==="fixed"),popper:Vo(N)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(D){return p.modifiersData[D.name]=Object.assign({},D.data)});for(var L=0;L<p.orderedModifiers.length;L++){if(p.reset===!0){p.reset=!1,L=-1;continue}var g=p.orderedModifiers[L],x=g.fn,O=g.options,A=O===void 0?{}:O,I=g.name;typeof x=="function"&&(p=x({state:p,options:A,name:I,instance:h})||p)}}}},update:hd(function(){return new Promise(function(k){h.forceUpdate(),k(p)})}),destroy:function(){b(),u=!0}};if(!ta(d,s))return h;h.setOptions(c).then(function(k){!u&&c.onFirstUpdate&&c.onFirstUpdate(k)});function w(){p.orderedModifiers.forEach(function(k){var E=k.name,m=k.options,N=m===void 0?{}:m,L=k.effect;if(typeof L=="function"){var g=L({state:p,name:E,instance:h,options:N}),x=function(){};f.push(g||x)}})}function b(){f.forEach(function(k){return k()}),f=[]}return h}}var bd=[Rc,rd,Mc,Lc,nd,Jc,sd,Fc,ed],Cd=gd({defaultModifiers:bd});function Po(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function oa(t,o){if(t){if(typeof t=="string")return Po(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Po(t,o):void 0}}function wd(t){return function(o){if(Array.isArray(o))return Po(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||oa(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
62
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function lt(t){return lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},lt(t)}function na(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function aa(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){na(l,a,r,i,d,"next",s)}function d(s){na(l,a,r,i,d,"throw",s)}i(void 0)})}}var ra={exports:{}},la={exports:{}};(function(t){function o(n){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(la),function(t){var o=la.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(C,_,B){C[_]=B.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function u(C,_,B){return Object.defineProperty(C,_,{value:B,enumerable:!0,configurable:!0,writable:!0}),C[_]}try{u({},"")}catch{u=function(_,B,j){return _[B]=j}}function h(C,_,B,j){var v=_&&_.prototype instanceof L?_:L,W=Object.create(v.prototype),X=new P(j||[]);return d(W,"_invoke",{value:y(C,B,X)}),W}function w(C,_,B){try{return{type:"normal",arg:C.call(_,B)}}catch(j){return{type:"throw",arg:j}}}r.wrap=h;var b="suspendedStart",k="suspendedYield",E="executing",m="completed",N={};function L(){}function g(){}function x(){}var O={};u(O,c,function(){return this});var A=Object.getPrototypeOf,I=A&&A(A(U([])));I&&I!==l&&i.call(I,c)&&(O=I);var D=x.prototype=L.prototype=Object.create(O);function T(C){["next","throw","return"].forEach(function(_){u(C,_,function(B){return this._invoke(_,B)})})}function $(C,_){function B(v,W,X,Q){var te=w(C[v],C,W);if(te.type!=="throw"){var le=te.arg,fe=le.value;return fe&&o(fe)=="object"&&i.call(fe,"__await")?_.resolve(fe.__await).then(function(ue){B("next",ue,X,Q)},function(ue){B("throw",ue,X,Q)}):_.resolve(fe).then(function(ue){le.value=ue,X(le)},function(ue){return B("throw",ue,X,Q)})}Q(te.arg)}var j;d(this,"_invoke",{value:function(v,W){function X(){return new _(function(Q,te){B(v,W,Q,te)})}return j=j?j.then(X,X):X()}})}function y(C,_,B){var j=b;return function(v,W){if(j===E)throw new Error("Generator is already running");if(j===m){if(v==="throw")throw W;return{value:a,done:!0}}for(B.method=v,B.arg=W;;){var X=B.delegate;if(X){var Q=S(X,B);if(Q){if(Q===N)continue;return Q}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(j===b)throw j=m,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);j=E;var te=w(C,_,B);if(te.type==="normal"){if(j=B.done?m:k,te.arg===N)continue;return{value:te.arg,done:B.done}}te.type==="throw"&&(j=m,B.method="throw",B.arg=te.arg)}}}function S(C,_){var B=_.method,j=C.iterator[B];if(j===a)return _.delegate=null,B==="throw"&&C.iterator.return&&(_.method="return",_.arg=a,S(C,_),_.method==="throw")||B!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+B+"' method")),N;var v=w(j,C.iterator,_.arg);if(v.type==="throw")return _.method="throw",_.arg=v.arg,_.delegate=null,N;var W=v.arg;return W?W.done?(_[C.resultName]=W.value,_.next=C.nextLoc,_.method!=="return"&&(_.method="next",_.arg=a),_.delegate=null,N):W:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,N)}function V(C){var _={tryLoc:C[0]};1 in C&&(_.catchLoc=C[1]),2 in C&&(_.finallyLoc=C[2],_.afterLoc=C[3]),this.tryEntries.push(_)}function F(C){var _=C.completion||{};_.type="normal",delete _.arg,C.completion=_}function P(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(V,this),this.reset(!0)}function U(C){if(C||C===""){var _=C[c];if(_)return _.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var B=-1,j=function v(){for(;++B<C.length;)if(i.call(C,B))return v.value=C[B],v.done=!1,v;return v.value=a,v.done=!0,v};return j.next=j}}throw new TypeError(o(C)+" is not iterable")}return g.prototype=x,d(D,"constructor",{value:x,configurable:!0}),d(x,"constructor",{value:g,configurable:!0}),g.displayName=u(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(C){var _=typeof C=="function"&&C.constructor;return!!_&&(_===g||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,f,"GeneratorFunction")),C.prototype=Object.create(D),C},r.awrap=function(C){return{__await:C}},T($.prototype),u($.prototype,p,function(){return this}),r.AsyncIterator=$,r.async=function(C,_,B,j,v){v===void 0&&(v=Promise);var W=new $(h(C,_,B,j),v);return r.isGeneratorFunction(_)?W:W.next().then(function(X){return X.done?X.value:W.next()})},T(D),u(D,f,"Generator"),u(D,c,function(){return this}),u(D,"toString",function(){return"[object Generator]"}),r.keys=function(C){var _=Object(C),B=[];for(var j in _)B.push(j);return B.reverse(),function v(){for(;B.length;){var W=B.pop();if(W in _)return v.value=W,v.done=!1,v}return v.done=!0,v}},r.values=U,P.prototype={constructor:P,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(F),!C)for(var _ in this)_.charAt(0)==="t"&&i.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=a)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var _=this;function B(te,le){return W.type="throw",W.arg=C,_.next=te,le&&(_.method="next",_.arg=a),!!le}for(var j=this.tryEntries.length-1;j>=0;--j){var v=this.tryEntries[j],W=v.completion;if(v.tryLoc==="root")return B("end");if(v.tryLoc<=this.prev){var X=i.call(v,"catchLoc"),Q=i.call(v,"finallyLoc");if(X&&Q){if(this.prev<v.catchLoc)return B(v.catchLoc,!0);if(this.prev<v.finallyLoc)return B(v.finallyLoc)}else if(X){if(this.prev<v.catchLoc)return B(v.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return B(v.finallyLoc)}}}},abrupt:function(C,_){for(var B=this.tryEntries.length-1;B>=0;--B){var j=this.tryEntries[B];if(j.tryLoc<=this.prev&&i.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var v=j;break}}v&&(C==="break"||C==="continue")&&v.tryLoc<=_&&_<=v.finallyLoc&&(v=null);var W=v?v.completion:{};return W.type=C,W.arg=_,v?(this.method="next",this.next=v.finallyLoc,N):this.complete(W)},complete:function(C,_){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&_&&(this.next=_),N},finish:function(C){for(var _=this.tryEntries.length-1;_>=0;--_){var B=this.tryEntries[_];if(B.finallyLoc===C)return this.complete(B.completion,B.afterLoc),F(B),N}},catch:function(C){for(var _=this.tryEntries.length-1;_>=0;--_){var B=this.tryEntries[_];if(B.tryLoc===C){var j=B.completion;if(j.type==="throw"){var v=j.arg;F(B)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(C,_,B){return this.delegate={iterator:U(C),resultName:_,nextLoc:B},this.method==="next"&&(this.arg=a),N}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(ra);var Mt=ra.exports(),jt=Mt;try{regeneratorRuntime=Mt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Mt:Function("r","regeneratorRuntime = r")(Mt)}function xd(t){var o=function(n,a){if(lt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(lt(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return lt(o)==="symbol"?o:String(o)}function Mo(t,o,n){return(o=xd(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Rt=e.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(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,f=c.clientY,u=p-i,h=f-d;u<0&&(u=0),h<0&&(h=0),u>t.size&&(u=t.size),h>t.size&&(h=t.size);var w=u/t.size*100,b=100-h/t.size*100;n("change",w,b)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ia=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},kd=ia(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),_d=ia(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function je(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}je(".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}"),Rt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[kd,_d,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Rt.__scopeId="data-v-24517fec",Rt.__file="src/picker/Saturation.vue";var Ut=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),Sd={ref:"canvas"};je(".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}"),Ut.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Sd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Ut.__scopeId="data-v-78b9f4f0",Ut.__file="src/picker/Hue.vue";var Gt=e.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(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),u=2*c;return p.width=u,p.height=u,f.fillStyle="#ffffff",f.fillRect(0,0,u,u),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var f=parseFloat((p/t.height).toFixed(2));n("change",f)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Ad={ref:"canvas"};je(".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}"),Gt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Ad,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Gt.__scopeId="data-v-24dc9656",Gt.__file="src/picker/Alpha.vue";var zt=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,o){var n=o.emit;return{onInput:function(a){var r;n("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){n("focus")},onBlur:function(){n("blur")},onEnter:function(){n("enter")}}}}),Nd={class:"input"},Td={class:"label"},Ld=[".value"];function _t(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,f=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(u){f=!0,i=u}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}}(t,o)||oa(t,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
63
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Te(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?sa(Object(n),!0).forEach(function(a){Mo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{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-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),zt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Nd,[e.createElementVNode("span",Td,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:o[0]||(o[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:o[1]||(o[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:o[2]||(o[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:o[3]||(o[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,Ld)])},zt.__scopeId="data-v-d52a4d02",zt.__file="src/picker/InputValue.vue";var ca=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},da={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Ht=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(da[o]||o).concat(da[n]||n)},pa=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Ht(o)).concat(Ht(n)).concat(Ht(a))},it=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},St=function(t,o,n){t=6*it(t,360),o=it(o,100),n=it(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*f)}},fa=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=ca(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=St(a,r,l),c=s.r,p=s.g,f=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(f,", ").concat(i,")");default:return"".concat(pa(St(a,r,l))).concat(Ht(255*i))}else switch(o){case"hsl":var u=ca(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*u[1]),"%, ").concat(Math.round(100*u[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=St(a,r,l),w=h.r,b=h.g,k=h.b;return"rgb(".concat(w,", ").concat(b,", ").concat(k,")");default:return pa(St(a,r,l))}},Wt=function(t){var o=t.r,n=t.g,a=t.b;o=it(o,255),n=it(n,255),a=it(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ua=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},ma=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},jo=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Ro(t,Uo(t),n),r=ba(a);return fa(r,o,n)}return""},ha=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},ya=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},ga=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Ro=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=ha(t),a=n.r,r=n.g,l=n.b,i=n.a;return Te(Te({},Wt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=ga(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=ya(t),c=s.h,p=s.s,f=s.l,u=s.a;return Te(Te({},ua({h:c,s:p,l:f})),{},{a:+u});default:var h=ma(t),w=h.r,b=h.g,k=h.b,E=h.a;return Te(Te({},Wt({r:w,g:b,b:k})),{},{a:E/255})}else switch(o){case"rgb":return Te(Te({},Wt(ha(t))),{},{a:1});case"hsv":var m=ga(t);return{h:m.h,s:m.s,v:m.v,a:1};case"hsl":return Te(Te({},ua(ya(t))),{},{a:1});default:return Te(Te({},Wt(ma(t))),{},{a:1})}},Uo=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},ba=function(t){var o=t.h,n=t.s,a=t.v,r=t.a;return isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:o,s:n,v:a,a:r}},At=e.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(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),u=2*c;return p.width=u,p.height=u,f.fillStyle="#ffffff",f.fillRect(0,0,u,u),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),Ed=["draggable"];je(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),At.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Ed)},At.__scopeId="data-v-02da71fd",At.__file="src/color-item/ColorItem.vue";var qt=e.defineComponent({name:"Colors",components:{ColorItem:At},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,o){var n=o.emit;return{onSelectColor:function(a,r){n("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return jo(a,"hex",!0)})})}}}),Bd={class:"colors"};function Ca(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ca(Object(n),!0).forEach(function(a){Mo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ca(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),qt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Bd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},qt.__scopeId="data-v-0f8b52a8",qt.__file="src/picker/Colors.vue";var Yt=e.defineComponent({name:"Picker",components:{Colors:qt,Saturation:Rt,Hue:Ut,Alpha:Gt,InputValue:zt},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{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return De(De({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var m,N=(m=t.value)===null||m===void 0?void 0:m.trim();if(N!=null&&N!==""){var L=Uo(N);return ba(Ro(N,L,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(m,N){var L="";m!=null?(L=fa(De({},m),t.format,t.showAlpha),i.value=De({},m)):i.value=null,d.value=L;var g=s();JSON.stringify(m)!==JSON.stringify(g)&&JSON.stringify(m)!==JSON.stringify(N)&&n("change",L)},{immediate:!0});var c=e.computed(function(){var m;return((m=e.unref(l))===null||m===void 0?void 0:m.h)||0}),p=e.computed(function(){var m;return((m=e.unref(l))===null||m===void 0?void 0:m.s)||0}),f=e.computed(function(){var m;return((m=e.unref(l))===null||m===void 0?void 0:m.v)||0}),u=e.computed(function(){var m,N;return((m=e.unref(l))===null||m===void 0?void 0:m.a)!=null?(N=e.unref(l))===null||N===void 0?void 0:N.a:1}),h=e.computed(function(){return St(e.unref(c),e.unref(p),e.unref(f))}),w=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),b=e.computed(function(){var m=t.format;if(t.showAlpha)switch(m){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(m){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),k=e.ref(-1),E=function(m,N,L){if(m.length!==0){var g=Ro(m,N,L),x=g.h,O=g.s,A=g.v;if(!(isNaN(x)||isNaN(O)||isNaN(A))){var I=1,D=g.a;isNaN(D)||(I=D),l.value={h:x,s:O,v:A,a:I}}}};return{h:c,s:p,v:f,a:u,rgbStr:w,onSelectSaturation:function(m,N){k.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:m,v:N,a:e.unref(u)}:l.value=De(De({},e.unref(l)),{},{s:m,v:N})},onSelectHue:function(m){k.value=-1,e.unref(l)==null&&(l.value={h:m,s:e.unref(p),v:e.unref(f),a:e.unref(u)}),l.value=De(De({},e.unref(l)),{},{h:m})},onSelectAlpha:function(m){k.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(f),a:m}:l.value=De(De({},e.unref(l)),{},{a:m})},label:b,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(m){k.value=-1,d.value=m},handleChange:function(){var m,N=(m=e.unref(d))===null||m===void 0?void 0:m.trim();if(N!==""){var L=t.showAlpha,g=t.format,x=function(O,A,I){if(I)switch(A){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(A){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(N,g,L);x?E(N,g,L):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:k,onSelectColor:function(m,N){if(k.value=N,(m=m.trim())==="")l.value=null;else{var L=Uo(m);L?E(m,L,!0):l.value=null}}}}}),Od={class:"picker-inner"},Vd={class:"picker-header"};je(".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}"),Yt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Od,[e.createElementVNode("div",Vd,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Yt.__scopeId="data-v-6ceadec6",Yt.__file="src/picker/Picker.vue";var Kt=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var o=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}})}}}),Id=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function wa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Go(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?wa(Object(n),!0).forEach(function(a){Mo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".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}"),Kt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(Id),4)},Kt.__scopeId="data-v-ceb1719c",Kt.__file="src/add-color-item/AddColorItem.vue";var qe=null,st=e.defineComponent({name:"ColorPicker",components:{ColorItem:At,Picker:Yt,AddColorItem:Kt},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,default:"hex"},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]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,o){var n=o.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(S){return jo(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",V=Array.isArray(S)?S:[S];a.value=V.map(function(F){return jo(F,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,f,u,h,w,b=e.ref(null),k=e.ref(null),E=(s=b,c=k,p={zIndex:t.zIndex},f=e.ref({}),u={strategy:"absolute",placement:"auto",onFirstUpdate:function(){qe.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(S){var V=S.state,F=V.styles,P=V.placement,U=F.popper;f.value=Go(Go(Go({},U),p),{},{transformOrigin:P==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(S,V){var F,P=_t(S,2),U=P[0],C=P[1],_=_t(V,2),B=_[0],j=_[1];if(U&&C&&(B!==U||j!==B)){(F=qe)===null||F===void 0||F.destroy();var v=U.$el||U,W=C.$el||C;e.nextTick(function(){qe=Cd(v,W,u)})}}),e.onBeforeUnmount(function(){var S;qe&&((S=qe)===null||S===void 0||S.destroy(),qe=null)}),{instance:qe,style:f}),m=E.style,N=function(){e.unref(b)==null&&(b.value=e.unref(y)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},L=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},g=e.ref(),x=function(){var S=aa(jt.mark(function V(F){var P,U,C,_;return jt.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(U=F.target,(C=(P=U.dataset)===null||P===void 0?void 0:P.index)!=null&&C!==""){B.next=4;break}return B.abrupt("return");case 4:if(_=+C,e.unref(l)!==_){B.next=7;break}return B.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==_?(L(),h&&clearTimeout(h),h=setTimeout(function(){N(),clearTimeout(h)},100)):N(),l.value=_,b.value=U;case 10:case"end":return B.stop()}},V)}));return function(V){return S.apply(this,arguments)}}(),O=function(){var S=aa(jt.mark(function V(F){var P,U,C,_,B;return jt.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(_=F.target,!(!((P=e.unref(g))!==null&&P!==void 0&&P.isEqualNode(_))&&(!((U=e.unref(g))===null||U===void 0)&&U.contains(_)))){j.next=4;break}return j.abrupt("return");case 4:if(B=(C=e.unref(k))===null||C===void 0?void 0:C.$el,!(B!=null&&B.contains(_))){j.next=8;break}return j.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&L()},0);case 10:case"end":return j.stop()}},V)}));return function(V){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(N(),clearTimeout(w))});var A,I=e.ref(t.max>e.unref(a).length),D=e.computed(function(){return typeof t.popupContainer=="string"||lt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),T=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),$=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(k)]},function(){e.nextTick(function(){var S,V;(S=e.unref(g))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref($)),(V=e.unref(k))===null||V===void 0||(V=V.$el)===null||V===void 0||V.setAttribute("pick-colors-theme",e.unref($))})},{immediate:!0}),e.provide("theme",{theme:$});var y=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&N()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),h&&(clearTimeout(h),h=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===S},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:I,onPickerChange:function(S){var V=e.unref(l),F=e.unref(a).slice(),P=e.unref(a).length;if(V!=null){V>=0?F[V]=S:(l.value=P,F.push(S));var U="";U=Array.isArray(t.value)||t.addColor?F:S,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,S,V)),t.addColor&&P>=t.max&&(I.value=!1,n("overflowMax"))}},colorPicker:g,onColorClick:x,pickerRef:k,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var V=S.target;A=+V.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var V=+S.target.dataset.index,F=wd(e.unref(a)),P=F[A];F.splice(A,1);var U=F.slice(0,V),C=F.splice(V),_=U.concat([P]).concat(C);n("update:value",_),n("change",_,_[A],A)},colorItemsRef:y,pickerStyle:m,values:r,teleportDisabled:T,toPopupContainer:D}}});je(".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)}"),st.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(f){return t.colorItemsRef[p]=f},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},st.__scopeId="data-v-3c43ade8",st.__file="src/ColorPicker.vue";const $d=e.defineComponent({name:"ColorPick",components:{PickColors:st,AInput:M.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),Lf="",Fd={class:"color-pick"};function Dd(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Fd,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const vd=ee($d,[["render",Dd],["__scopeId","data-v-e2113f43"]]),Pd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:st},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{M.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Ef="",Md={class:"color-group-pick"};function jd(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Md,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Rd=ee(Pd,[["render",jd],["__scopeId","data-v-b2be8322"]]),Ud=e.defineComponent({name:"FormGroup",components:{Draggable:pt,AppstoreAddOutlined:xn,MinusCircleOutlined:dl,PickColors:st,InputNumber:vn,PlusCircleOutlined:ml},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var f;const c=(f=t.value)==null?void 0:f.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const u=c[0];if(Object.prototype.toString.call(u)==="[object Object]"){const h=Object.keys(u),w={};h.forEach(b=>{w[b]=""}),c.push(w)}else typeof u=="string"&&c.push(u);n.value=c}else M.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,f)=>{var h;const u=(h=t.value)==null?void 0:h.slice();if(Array.isArray(u)){const w=c==null?void 0:c.target,b=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;f?u[p][f]=b:u[p]=b,n.value=u}},onDelete:c=>{var f;const p=(f=t.value)==null?void 0:f.slice();if(Array.isArray(p)){if(p.length===1){M.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),Bf="",Gd={class:"form-group"},zd={class:"form-row"},Hd={key:0,class:"label"},Wd={key:1,class:"label"},qd={class:"icon-group"};function Yd(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Gd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",zd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:u},[Array.isArray(f.label)?(e.openBlock(),e.createElementBlock("span",Hd,e.toDisplayString(f.useLabelIndex?f.label[p]+(p+1):f.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Wd,e.toDisplayString(f.useLabelIndex?f.label+(p+1):f.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(f.type)),e.mergeProps({class:"value",[t.formatTypeValue(f.typeValue)||""]:typeof c=="string"?c:c[f.value]??f.defaultValue,style:{width:!["color","switch"].includes(f.type)&&t.format.length>1?"110px":""}},f.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,f.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:f=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Kd=ee(Ud,[["render",Yd],["__scopeId","data-v-f0c0ab4d"]]),Xd=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:M.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Qd(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Jd=ee(Xd,[["render",Qd]]),Zd=e.defineComponent({name:"PropsToForm",components:{Input:oc,InputNumber:vn,RadioGroup:ic,Select:dc,Switch:uc,ColorPick:vd,ColorGroupPick:Rd,FormGroup:Kd,Textarea:Jd},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Tt),n=e.inject(Qt),a=e.inject(Jt),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:f,value:u}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:w="change",events:b}=p;c[f]={...p,valueProp:h,value:u,events:{[w]:(k,E=!0)=>{l(E?{[f]:k}:{})},...b}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:ne.reduce(s,(c,p,f)=>{const u=Zs[f];if(Array.isArray(u)){const h=u.find(w=>{const{onlyType:b,excludeType:k}=w;return b==null&&k==null?!0:b?Ve(e.unref(r),b):k?!Ve(e.unref(r),k):!1});h&&i({result:c,value:p,key:f,mapAttributeProp:h})}else i({result:c,value:p,key:f,mapAttributeProp:u});return c},{})}),lowerCaseIncludes:Ve}}}),Of="",ep={class:"props-to-form"},tp={class:"label"},op={class:"component-wrapper"};function np(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",tp,e.toDisplayString(i.label),1),e.createElementVNode("div",op,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const ap=ee(Zd,[["render",np],["__scopeId","data-v-c6fb2484"]]);function rp(){return new Worker("/assets/editor.worker-02df2e61.js")}function lp(){return new Worker("/assets/json.worker-867823a6.js")}function ip(){return new Worker("/assets/ts.worker-7254b425.js")}const sp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new lp:i==="typescript"||i==="javascript"?new ip:new rp}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=La.editor.create(n.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(ne.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),Vf="",cp={class:"editor",ref:"dom"};function dp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",cp,null,512)}const xa=ee(sp,[["render",dp],["__scopeId","data-v-71e88372"]]),pp=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],fp=e.defineComponent({name:"TableColumnConfig",components:{ATable:M.Table,AModal:M.Modal,ACheckbox:M.Checkbox,AInput:M.Input,AInputNumber:M.InputNumber,ASelect:M.Select,ASelectOption:M.SelectOption,Editor:xa},setup(){const t=e.inject(ve),o=e.computed(()=>{var b;return!!((b=e.unref(t))!=null&&b.isGroupTable)}),n=e.computed(()=>{var b;return((b=e.unref(t))==null?void 0:b.graphicConfig)||{}}),a=e.computed(()=>{var b;return((b=e.unref(t))==null?void 0:b.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var k,E,m;let b=[];if(r.value=[],!o.value)b=((k=e.unref(n))==null?void 0:k.queryColumnList)||[];else{const N=((E=e.unref(n))==null?void 0:E.rowHeaderList)||[],L=((m=e.unref(n))==null?void 0:m.indicators)||[];b=[...N,...L]}b.forEach(N=>{var g;let L=(g=e.unref(a))==null?void 0:g.find(x=>x.prop===N.name);L||(L={label:N.label,prop:N.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(L)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:pp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(b,k,E)=>{b&&k&&(l=b,i=k,d.value=b[k]||"",c.value=!0,s.value=E)},onEditorChange:b=>{try{d.value=b}catch(k){console.error(k)}},changeRenderBool:(b,k)=>{b.style=k.target.checked,b.style?b.renderBool===void 0&&(b.renderBool=!1):delete b.renderBool}}}}),If="",up={class:"table-column-config"};function mp(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),f=e.resolveComponent("a-table"),u=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",up,[e.createVNode(f,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:w,text:b,record:k})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:E=>t.changeRenderBool(k,E),checked:k.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:k.width,"onUpdate:value":E=>k.width=E,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k.style?(e.openBlock(),e.createBlock(d,{key:1,value:k.renderText,"onUpdate:value":E=>k.renderText=E,readOnly:!0,onClick:E=>t.renderSave(k,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(b),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k.style?(e.openBlock(),e.createBlock(d,{key:1,value:k.headerTemplate,"onUpdate:value":E=>k.headerTemplate=E,readOnly:!0,onClick:E=>t.renderSave(k,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(b),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:k.headerAlign,"onUpdate:value":E=>k.headerAlign=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:k.align,"onUpdate:value":E=>k.align=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:k.fixed,"onUpdate:value":E=>k.fixed=E},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:k.dataFormat,"onUpdate:value":E=>k.dataFormat=E,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[k.dataFormat&&k.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:k.retentiondigit,"onUpdate:value":E=>k.retentiondigit=E,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=w=>t.editorVisible=w),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(u,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const hp=ee(fp,[["render",mp],["__scopeId","data-v-afebddc0"]]),yp=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:ap,TableColumnConfig:hp,Editor:xa,AFormItem:M.FormItem,ASelect:M.Select,ASelectOption:M.SelectOption,ACollapse:M.Collapse,ACollapsePanel:M.CollapsePanel,ASwitch:M.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Tt),r=e.inject(Ko),l=e.inject(Qt),i=e.inject(Jt),d=e.inject(Yo),s=g=>{l({...Zo[g]},!1),d()},c=e.computed(()=>{var g;return(g=e.unref(a))==null?void 0:g.type}),p=["showTotalBool","totalName","expandAll"],f=e.computed(()=>Js.map(g=>{const{props:x,title:O,enableProps:A,onlyType:I,excludeType:D}=g,T=[];x.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&T.push(S):T.push(S))});let $,y;return t.componentType==="table"&&(I!=null&&I.includes(t.componentType))?($=typeof A=="string"&&r.value?r.value[A]:void 0,y=ne.pick(e.unref(r),T)):($=typeof A=="string"&&a.value?a.value[A]:void 0,y=ne.pick(e.unref(a),T)),{title:O,enableProps:$,enablePropsName:A,onlyType:I,excludeType:D,props:y}}).filter(({props:g})=>Object.keys(g).length>0)),u=(g,x)=>{const{onlyType:O,excludeType:A}=g;return O==null&&A==null?!0:O?Ve(x,O):A?!Ve(x,A):!1},h=(g,x)=>(x==null||x.stopPropagation(),g),w=(g,x)=>{x!=null&&l({[x]:g})},b=e.computed(()=>JSON.stringify(e.unref(a),null,2)),k=g=>{try{const x=JSON.parse(g||"{}");l(x,!1)}catch(x){console.error(x)}},E=e.ref(""),m=g=>{try{E.value=g}catch(x){console.error(x)}},N=(g,x)=>{try{i({[x]:g})}catch(O){console.error(O)}},L=e.computed(()=>{var g;return["customGraph"].includes((g=e.unref(a))==null?void 0:g.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:b,updateComponentOptions:k,tableOptions:r,optionCode:E,onEditorChange:m,tableEditorChange:N,onSwitchClick:h,onSwitchChange:w,detailPropsGroups:f,isRenderForm:u,isShowOptionEditor:L}}}),$f="",Ff="",gp={class:"style-group"};function bp(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),f=e.resolveComponent("a-collapse-panel"),u=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",gp,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=b=>t.type=b),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=b=>t.activePanel=b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,b=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b.title},[t.isRenderForm(b,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[b.title?(e.openBlock(),e.createBlock(f,{header:b.title,key:b.title},{extra:e.withCtx(()=>[typeof b.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:b.enableProps,onChange:k=>t.onSwitchChange(k,b.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:b.props,disabled:typeof b.enableProps=="boolean"?!b.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(f,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(u,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=b=>t.tablePanel=b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,b=>{var k;return e.openBlock(),e.createElementBlock(e.Fragment,{key:b.title},[b.title&&((k=b.onlyType)!=null&&k.includes(t.componentType))?(e.openBlock(),e.createBlock(f,{header:b.title,key:b.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:b.props,disabled:typeof b.enableProps=="boolean"?!b.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(f,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(w)]),_:1}),e.createVNode(f,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(u,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=b=>t.tableEditorChange(b,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(f,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(u,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=b=>t.tableEditorChange(b,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Cp=ee(yp,[["render",bp],["__scopeId","data-v-2fb3e2ad"]]),wp=e.defineComponent({name:"Card",components:{CloseOutlined:yo},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(Re),a=e.inject(Lt),r=e.inject(Jo),l=e.computed(()=>{var y;return(y=e.unref(n))==null?void 0:y.filter(S=>S.keyName!=="")}),i=e.computed(()=>{var V,F;const y=[],S=(V=e.unref(l))==null?void 0:V.find(P=>{var U;return P.id===((U=t.control)==null?void 0:U.id)});if(S){const P=S.type,U=ne.pick(S,["value","startTime","endTime"]);(F=Object.keys(U))!=null&&F.length||(U.value="");for(const C in U)if(Object.prototype.hasOwnProperty.call(U,C)){const _=e.unref(r)[C];if(Array.isArray(_)){const B=_.find(j=>Ve(P,j.onlyType));B&&y.push({label:B.label,value:C})}else y.push({label:_.label,value:C})}}return y}),d=()=>{o("delete",t.index),s(t.control.id)};function s(y){const S=e.unref(l).find(V=>V.id===y);if(S){const{type:V,id:F,events:P=[]}=S,U=$t(V),C=P.findIndex(_=>{var B;return _.on===U&&_.target===((B=e.unref(b))==null?void 0:B.id)&&_.emit==="refreshData"});C!==-1&&(P.splice(C,1),a({id:F,events:P}))}}const c=y=>{const S={...t.control};if(S.id=y,y){const V=e.unref(l).find(F=>F.id===y);V&&(S.keyName=V.keyName,m(V,y))}delete S.prop,o("update",S,t.index)},p=e.ref(""),f=()=>{p.value=t.control.id},u=y=>{o("update",{...t.control,prop:y},t.index)},h=y=>{o("update",{...t.control,rule:y},t.index)},w=y=>{const S={...t.control};y==null?delete S.mode:S.mode=y,delete S.conditionLabel,delete S.conditionName,delete S.conditionKey,delete S.conditionValueType,o("update",S,t.index)},b=e.inject(ve),k=e.inject(pe),E=e.computed(()=>{var X;const{classificationList:y=[],seriesList:S=[],leftAxisList:V=[],rightAxisList:F=[],indicators:P=[],rowHeaderList:U=[],queryColumnList:C=[]}=e.unref(k),_=ne.cloneDeep([...y,...S,...V,...F,...P,...U,...C]);if(_!=null&&_.length)for(const Q of _)Q.id=Q.name;const B=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE"},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT"},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT"},...t.intersection.map(Q=>({...Q,id:Q.name,label:Q.title||Q.label})),..._];((X=e.unref(b))==null?void 0:X.type)==="ecanSelect"&&B.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const j=new Map,v=B.length;for(let Q=0;Q<v;Q++){const te=B[Q],{id:le}=te||{};j.set(le,te)}return[...j].map(([Q,te])=>te)});function m(y,S){var C;const{type:V,id:F,events:P=[]}=y,U=$t(V);if(e.unref(p)&&S!==e.unref(p)){const{controlList:_=[]}=e.unref(k);_.find(B=>B.id===e.unref(p))||s(e.unref(p))}P.find(_=>{var B;return _.on===U&&_.target===((B=e.unref(b))==null?void 0:B.id)&&_.emit==="refreshData"})||a({id:F,events:[...P,{on:U,target:(C=e.unref(b))==null?void 0:C.id,emit:"refreshData"}].reverse()})}const N=(y,S)=>{if(y){const{label:V,name:F,id:P,genericType:U}=S||{};o("update",{...t.control,conditionKey:P,conditionLabel:V,conditionName:F,conditionValueType:U},t.index)}else{const V={...t.control};delete V.conditionLabel,delete V.conditionName,delete V.conditionKey,delete V.conditionValueType,o("update",V,t.index)}},L=(y,S)=>{var V;return(V=S==null?void 0:S.keyName)==null?void 0:V.toLowerCase().includes(y==null?void 0:y.toLowerCase())},g=(y,S)=>{var V;return(V=S==null?void 0:S.label)==null?void 0:V.toLowerCase().includes(y==null?void 0:y.toLowerCase())},x=e.computed(()=>{const y=e.unref(E).find(V=>V.id===t.control.conditionKey);let S="";return y&&(S=(y==null?void 0:y.genericType)||""),S==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:S==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:S==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),O=e.computed(()=>{let y=!1;const{id:S=""}=t.control;if(S){const V=e.unref(l).find(P=>P.id===S),F=["table","bar","combograph","line","pie","radar","scatter","list"];Ve(V==null?void 0:V.type,F)&&(y=!0)}return y}),A=e.computed(()=>{let y=!1;const{id:S=""}=t.control;if(S){const V=e.unref(l).find(F=>F.id===S);(V==null?void 0:V.type)==="ecanRangePicker"&&(y=!0)}return y}),I=e.computed(()=>{let y=!1;const{id:S=""}=t.control;if(S){const V=e.unref(l).find(F=>F.id===S);["ecanDatePicker","ecanRangePicker"].includes(V==null?void 0:V.type)&&(y=!0)}return y});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:f,onPropChange:u,onModeChange:w,onRuleChange:h,conditionKeyOptions:E,onConditionKeyChange:N,idFilterOption:L,filterOption:g,onFormatChange:y=>{o("update",{...t.control,format:y},t.index)},onModelPropChange:y=>{o("update",{...t.control,modelKey:y.target.value},t.index)},ruleOption:x,isShowProp:A,isShowFormat:I,isShowModelProp:O,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),Df="",vf="",xp={class:"control-card"};function kp(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",xp,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:2,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const _p=ee(wp,[["render",kp],["__scopeId","data-v-00350e9a"]]),Sp=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:_p,AButton:M.Button},setup(t,{expose:o}){const n=e.inject(Re),a=e.inject(pe),r=e.inject(Be),l=e.computed(()=>{var u;const f=((u=e.unref(a))==null?void 0:u.controlList)||[];for(const h of f)h.conditionKey&&!No(h,"rule")&&(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL");return f}),i=e.ref(null),d=f=>{const u={...e.unref(a),...f,sqlConditions:Fn({...e.unref(a),...f},e.unref(n))};r(u)},s=()=>{var u;const f=(u=e.unref(l))==null?void 0:u.slice();f.push({}),d({controlList:f})},c=f=>{var h;const u=(h=e.unref(l))==null?void 0:h.slice();u.splice(f,1),d({controlList:u})},p=(f,u)=>{var w;const h=(w=e.unref(l))==null?void 0:w.slice();h[u]=f,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),Pf="",Ap={class:"control-group"},Np={class:"control-group-header"},Tp={class:"control-group-content"};function Lp(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("div",Np,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",Tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const Ep=ee(Sp,[["render",Lp],["__scopeId","data-v-365e5dd8"]]),Bp=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:f}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,f)=>{a(p),c?f<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f,calcType:u="COLUMN",builtInFormula:h,builtInValueSource:w,builtInCalcWay:b,formula:k,conditions:E,aggregate:m}=i;let N;return E&&(N=r(E)),{label:d.trim(),columnName:s,location:c,show:p,calcType:u,hrpIndexCode:f,aggregate:m,builtInFormula:h,builtInValueSource:w,builtInCalcWay:b,formula:k,conditions:N}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:f="1",layer:u,chartType:h,classificationList:w=[],seriesList:b=[],leftAxisList:k=[],rightAxisList:E=[],queryColumnList:m=[],indicators:N=[],dataSourceId:L,idxLibMode:g,preview:x=!1}=i||{};u==null&&(Ve(d,"table")?u="1":u="2");let O;if(Array.isArray(w)&&w.length>0){const T=w.length;for(let $=0;$<T;$++){const y=w[$]||{},{label:S="",name:V="",show:F=!1,sort:P,customGroup:U,conditions:C}=y;if(F||T===1){O={label:S.trim(),columnName:V,show:F,sort:P,customGroup:U,conditions:r(C)};break}}}let A;if(Array.isArray(b)&&b.length>0){const T=b.length;for(let $=0;$<T;$++){const y=b[$]||{},{label:S="",name:V="",show:F=!1,sort:P,customGroup:U,conditions:C}=y;if(F||T===1){A={label:S.trim(),columnName:V,show:F,sort:P,customGroup:U,conditions:r(C)};break}}}const I=[];m==null||m.forEach(T=>{I.push(o(T))});const D=[];if(k==null||k.forEach(T=>{T.location="LEFT",D.push(l(T))}),E==null||E.forEach(T=>{T.location="RIGHT",D.push(l(T))}),N==null||N.forEach(T=>{T.location="LEFT",D.push(l(T))}),!(u==="1"&&I.length===0)&&!(u==="2"&&D.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:f,layer:u,chartType:h,classification:O,series:A,indicatorList:D,queryColumns:I,pageFlag:!0,sqlConditions:[],dataSourceId:L,idxLibMode:g,preview:x})}catch(T){console.error(T)}}},ka=(t,o)=>{const n={dayjs:ie,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Xt=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=c.match(p);for(let u=0;u<f.length;u++){const h=f[u],w=l[h];w!=null&&(c=c.replace(h,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=ka(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),t},Nt=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=ka(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},Op=(t,o,n)=>{switch(t.type){case"bar":return Vp(t,o,n);case"line":return Ip(t,o,n);case"pie":return $p(t,o,n);case"comboGraph":return Fp(t,o,n);default:return{}}},Vp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,f=[];for(let u=0;u<p;u++){const h={...c[u],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},f.push(h)}return f}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let f="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:b,name:k,value:E,data:m}=c[h]||{};h===0&&(f+=`${k}<br/>`),f+=Xt(u,{textData:{marker:w,name:k,value:E,a:b,b:k,c:E,...m}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},Ip=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let f=0;f<p;f++)c.push({type:"line",...i[f],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let f="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:b,name:k,value:E,data:m}=c[h]||{};h===0&&(f+=`${k}<br/>`),f+=Xt(u,{textData:{marker:w,name:k,value:E,a:b,b:k,c:E,...m}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},$p=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:f}=l||{};return Xt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...f}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:Pi(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},Fp=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let f=0;f<c;f++){const u=p[f];s.push({type:u==null?void 0:u.type,yAxisIndex:u==null?void 0:u.axisIndex,...r[f]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Nt(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");const u=t.seriesTypes;for(let h=0;h<c;h++){const w=u[h],{tooltipFormatter:b}=w||{},{marker:k,seriesName:E,name:m,value:N,data:L}=s[h]||{};h===0&&(p+=`${m}<br/>`),p+=Xt(b||f,{textData:{marker:k,name:m,value:N,seriesName:E,a:E,b:m,c:N,...L}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},Dp=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let u=0;u<d;u++){const h=a[u],{label:w,value:b}=h,k={...t[0],value:t[0][b]};r.add(w),p.push(k)}const f=t[0][n]||"";l.set(f,p)}else for(let p=0;p<i;p++){const f=t[p],u=f[n];r.add(u);for(let h=0;h<d;h++){const w=a[h],{label:b,value:k}=w,E={...f,value:f[k]};if(l.has(b)){const m=l.get(b);m.push(E),l.set(b,m)}else l.set(b,[E])}}const s=Array.from(r),c=[];for(const[p,f]of l)c.push({name:p,data:f});return{dimensions:s,dataset:c}},vp=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const f=t[p],u=f[n]||"",h=f[a]||"",w=f[r]||"";if(l.add(u),i.has(w)){const b=i.get(w);b.push({name:u,value:h,...f}),i.set(w,b)}else i.set(w,[{name:u,value:h,...f}])}const s=Array.from(l),c=[];for(const[p,f]of i)c.push({name:p,data:f});return{dimensions:s,dataset:c}},Pp=e.defineComponent({name:"ChartGraph",components:{ASpin:M.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Le);let l=null;const i=e.inject(Ee)||"",d=e.inject(pe)||{},s=e.inject(Tt)||{},c=e.ref(null),p=e.ref(null),f=e.ref(),u=e.ref(!1),h=e.ref(!1),w=e.computed(()=>h.value?Va:12),b=e.ref({}),k=e.ref(),E=e.computed(()=>{const I=e.unref(n.value);if((I==null?void 0:I.type)==="customGraph")return k.value;const D=Op(I,e.unref(b),w.value);return{toolbox:{show:I.toolboxShow,left:I.toolboxLeft,top:I.toolboxTop,itemSize:I.toolboxItemSize,itemGap:I.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:I.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:I.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:I.titleText,subtext:I.titleSubtext,left:"center"},grid:{top:I.gridTop,bottom:I.gridBottom,left:I.gridLeft,right:I.gridRight,containLabel:I.gridContainLabel},color:I.colors,...D}}),m=(I=[],D,T=!1)=>{const $=T?D:null;b.value=Dp(I,$)},N=(I=[],D)=>{b.value=vp(I,D)},L=async()=>{var I,D,T;try{const $=Bp({graphicConfig:e.unref(a.value),type:(I=e.unref(n.value))==null?void 0:I.type,request:r,indicatorToken:i});u.value=!0;const y=await $(),{columns:S=[],rows:V=[]}=((D=y==null?void 0:y.data)==null?void 0:D.data)??{};if(((T=e.unref(n.value))==null?void 0:T.type)==="pie"){let F=[];if(S.length>0){const P=S[0],U=S[1];F=V.map(C=>({name:C[P],value:C[U]}))}N(F)}else{let F;S.length>0&&(F={name:S[0],types:S.slice(1).map(P=>({label:P,value:P}))}),m(V,F,!0)}}catch($){console.error($)}finally{u.value=!1}},g={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},x=()=>{e.unref(b).dataset.length===0?f.value.setOption(g):f.value.setOption(E.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&L()},A=()=>{var I;(I=f.value)==null||I.resize()};return e.watch(E,()=>{x()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,I=>{try{const D=eval;k.value=D(I)}catch(D){console.error(D)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(A),l.observe(p.value)),f.value=Oa.init(c.value)}),e.onBeforeUnmount(()=>{f.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:O}),{echartRef:c,loading:u}}}),Mf="",Mp={class:"ecan-chart-graph",ref:"chartWrapRef"},jp={style:{width:"100%",height:"100%"},ref:"echartRef"};function Rp(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",Mp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",jp,null,512)]),_:1},8,["spinning"])],512)}const _a=ee(Pp,[["render",Rp],["__scopeId","data-v-8049fed2"]]),Up=e.defineComponent({name:"DataConfig",components:{DataGroup:Qs,StyleGroup:Cp,ChartGraph:_a,ATabs:M.Tabs,ATabPane:M.TabPane,ControlGroup:Ep},setup(){var L;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(ve),r=e.inject(qo),l=e.inject(pe),i=e.inject(Re),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const g=ne.cloneDeep(e.unref(a));c(g);const x=ne.pick(g,ne.without(Object.keys(g),"position","top","left","width","height"));Ve(g.type,d)?(x.height=g.height,x.width=g.width):x.height="290px";const O=ne.cloneDeep(e.unref(l));return O.pageMode="design",O.componentList=i,O.preview=!0,{...x,graphicConfig:O,toolboxShow:!1}});function c(g){var x,O,A,I;["#ffffff","#fff"].includes((x=g==null?void 0:g.color)==null?void 0:x.toLowerCase())&&(g.color="#000"),["#ffffff","#fff"].includes((O=g==null?void 0:g.variableColor)==null?void 0:O.toLowerCase())&&(g.variableColor="#000"),["#ffffff","#fff"].includes((A=g==null?void 0:g.increaseColor)==null?void 0:A.toLowerCase())&&(g.increaseColor="#000"),["#ffffff","#fff"].includes((I=g==null?void 0:g.declineColor)==null?void 0:I.toLowerCase())&&(g.declineColor="#000")}const p=e.computed(()=>{let g=!0;return Ve(e.unref(s).type,d)&&(g=!1),g}),f=e.computed(()=>{var g;return(g=e.unref(s))==null?void 0:g.type}),u=e.computed(()=>{var g;return!!((g=e.unref(s))!=null&&g.isGroupTable)}),h=g=>{const x=g==="1";x&&f.value==="table"&&N(),window.changeShowTable&&window.changeShowTable(x),g==="3"&&m()},w=e.ref(),b=e.inject(Le),k=e.unref(e.inject(Ee)),E=(L=window==null?void 0:window.config)==null?void 0:L.pageId;function m(){var T;const{leftAxisList:g=[],rightAxisList:x=[],queryColumnList:O=[],indicators:A=[]}=e.unref(l),I=[...g,...x,...O,...A],D={};for(const $ of I){const{id:y="",indexCode:S=""}=$;y&&!No($,"calcType")&&!D[y]&&(D[y]=S)}if((T=Object.keys(D))!=null&&T.length){const $=[];for(const y in D)$.push(new Promise((S,V)=>{b.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:E,indexGuid:y,indexCode:D[y],dataSourceId:""},{headers:{Authentication:k,operateContext:"ygt"}}).then(F=>{var C;const{success:P,data:U=[]}=F.data;P&&((C=U==null?void 0:U.dataViewColumns)!=null&&C.length)?S(U.dataViewColumns):V(U)}).catch(F=>{V(F)})}));Promise.all($).then(y=>{if(y!=null&&y.length){const S=y.reduce((V,F)=>V.filter(P=>F.find(U=>U.typeGuid===P.typeGuid)));w.value=S.filter(V=>V.typeGuid)}})}}const N=()=>{var x;let g;r&&f.value==="table"?g=window.updateConfig:g=(x=e.unref(n))==null?void 0:x.refreshData,typeof g=="function"&&g()};return e.provide(Yo,N),e.watch(l,()=>{N()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:u,onChange:h,component:s,fullWidth:p,renderUsedComponents:i,intersection:w}}}),jf="",Gp={class:"data-config"},zp={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Hp(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=u=>t.activeKey=u),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",zp,null,512)):e.withDirectives((e.openBlock(),e.createBlock(f,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const Wp=ee(Up,[["render",Hp],["__scopeId","data-v-df437f90"]]),qp=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Fl,DataConfig:Wp},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var g;return((g=e.unref(i))==null?void 0:g.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?ne.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?ne.cloneDeep(e.unref(i).chartsOptions):e.ref(ne.cloneDeep(Zo.line));p=e.ref(p);let f=e.unref(i).tableOptions?ne.cloneDeep(e.unref(i).tableOptions):e.ref(ne.cloneDeep(Ia));f=e.ref(f);const u=e.ref([]),h=g=>{u.value=g},w=g=>{c.value={...e.unref(c),...e.unref(g)}},b=(g,x=!0)=>{x?p.value={...e.unref(p),...e.unref(g)}:p.value={...e.unref(g)}},k=g=>{f.value={...e.unref(f),...e.unref(g)}},E=()=>u,m=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=ne.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=ne.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},N=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(f),tableColumns:e.unref(d)});window.getIndicatorData=N,t.request&&e.provide(Le,t.request),e.provide(Wo,{setDataList:h,getDataList:E});const L=g=>{n("updateUsedComponent",g)};return e.provide(ve,i),e.provide(pe,c),e.provide(Tt,p),e.provide(Ko,f),e.provide(Zt,r),e.provide(qo,s),e.provide(Ee,l),e.provide(Be,w),e.provide(Qt,b),e.provide(Jt,k),e.provide(Re,t.renderUsedComponentList),e.provide(Lt,L),e.provide(Jo,t.mapAttributeProps),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:m}),{isUpdate:a}}}),Rf="",Yp={key:0,class:"config-modal"},Kp={class:"config-modal-left"},Xp={class:"config-modal-right"};function Qp(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Yp,[e.createElementVNode("div",Kp,[e.createVNode(i)]),e.createElementVNode("div",Xp,[e.createVNode(d)])]))}const Sa=Ho(ee(qp,[["render",Qp],["__scopeId","data-v-8e2109bf"]])),Aa=Ho(_a),Na=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Aa,EcanIndicatorLibrary:Sa},Symbol.toStringTag,{value:"Module"})),Jp={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Na).forEach(a=>{const r=Na[a];r.install&&t.use(r)})}};me.EcanChartGraph=Aa,me.EcanIndicatorLibrary=Sa,me.default=Jp,Object.defineProperties(me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
56
+ `,yn=!1,fr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pr;e.nextTick(function(){yn||(typeof window<"u"&&window.document&&window.document.documentElement&&ir(o,{prepend:!0}),yn=!0)})},ur=["icon","primaryColor","secondaryColor"];function mr(t,o){if(t==null)return{};var n=hr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function hr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Vt(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){yr(t,r,n[r])})}return t}function yr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ht={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function gr(t){var o=t.primaryColor,n=t.secondaryColor;ht.primaryColor=o,ht.secondaryColor=n||mn(o),ht.calculated=!!n}function br(){return Vt({},ht)}var et=function(o,n){var a=Vt({},o,n.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=mr(a,ur),s=ht;if(l&&(s={primaryColor:l,secondaryColor:i||mn(l)}),fr(),dr(un(r),"icon should be icon definiton, but got ".concat(r)),!un(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Vt({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),so(c.icon,"svg-".concat(c.name),Vt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};et.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},et.inheritAttrs=!1,et.displayName="IconBase",et.getTwoToneColors=br,et.setTwoToneColors=gr;const co=et;function Cr(t,o){return _r(t)||kr(t,o)||xr(t,o)||wr()}function wr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
57
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xr(t,o){if(t){if(typeof t=="string")return gn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gn(t,o)}}function gn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function kr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function _r(t){if(Array.isArray(t))return t}function bn(t){var o=hn(t),n=Cr(o,2),a=n[0],r=n[1];return co.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Sr(){var t=co.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Ar=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Nr(t,o){return Br(t)||Er(t,o)||Lr(t,o)||Tr()}function Tr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
58
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lr(t,o){if(t){if(typeof t=="string")return Cn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cn(t,o)}}function Cn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Er(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function Br(t){if(Array.isArray(t))return t}function wn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){po(t,r,n[r])})}return t}function po(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Or(t,o){if(t==null)return{};var n=Vr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Vr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}bn("#1890ff");var tt=function(o,n){var a,r=wn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,f=r.onClick,m=Or(r,Ar),h=(a={anticon:!0},po(a,"anticon-".concat(i.name),!!i.name),po(a,l,l),a),w=d===""||d||i.name==="loading"?"anticon-spin":"",b=c;b===void 0&&f&&(b=-1,m.tabindex=b);var N=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,E=hn(p),u=Nr(E,2),B=u[0],_=u[1];return e.createVNode("span",wn({role:"img","aria-label":i.name},m,{onClick:f,class:h}),[e.createVNode(co,{class:w,icon:i,primaryColor:B,secondaryColor:_,style:N},null)])};tt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},tt.displayName="AntdIcon",tt.inheritAttrs=!1,tt.getTwoToneColor=Sr,tt.setTwoToneColor=bn;const Ce=tt;var Ir={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const $r=Ir;function xn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Fr(t,r,n[r])})}return t}function Fr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var fo=function(o,n){var a=xn({},o,n.attrs);return e.createVNode(Ce,xn({},a,{icon:$r}),null)};fo.displayName="AppstoreAddOutlined",fo.inheritAttrs=!1;const kn=fo;var Dr={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 vr=Dr;function _n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Pr(t,r,n[r])})}return t}function Pr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var uo=function(o,n){var a=_n({},o,n.attrs);return e.createVNode(Ce,_n({},a,{icon:vr}),null)};uo.displayName="CaretDownOutlined",uo.inheritAttrs=!1;const Mr=uo;var jr={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 Rr=jr;function Sn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ur(t,r,n[r])})}return t}function Ur(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var mo=function(o,n){var a=Sn({},o,n.attrs);return e.createVNode(Ce,Sn({},a,{icon:Rr}),null)};mo.displayName="CaretRightOutlined",mo.inheritAttrs=!1;const Gr=mo;var zr={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 Hr=zr;function An(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Wr(t,r,n[r])})}return t}function Wr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ho=function(o,n){var a=An({},o,n.attrs);return e.createVNode(Ce,An({},a,{icon:Hr}),null)};ho.displayName="CloseOutlined",ho.inheritAttrs=!1;const yo=ho;var qr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const Yr=qr;function Nn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Kr(t,r,n[r])})}return t}function Kr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var go=function(o,n){var a=Nn({},o,n.attrs);return e.createVNode(Ce,Nn({},a,{icon:Yr}),null)};go.displayName="CopyOutlined",go.inheritAttrs=!1;const Xr=go;var Qr={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 Jr=Qr;function Tn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Zr(t,r,n[r])})}return t}function Zr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var bo=function(o,n){var a=Tn({},o,n.attrs);return e.createVNode(Ce,Tn({},a,{icon:Jr}),null)};bo.displayName="DeleteOutlined",bo.inheritAttrs=!1;const el=bo;var tl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const ol=tl;function Ln(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){nl(t,r,n[r])})}return t}function nl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Co=function(o,n){var a=Ln({},o,n.attrs);return e.createVNode(Ce,Ln({},a,{icon:ol}),null)};Co.displayName="DoubleRightOutlined",Co.inheritAttrs=!1;const al=Co;var rl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const ll=rl;function En(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){il(t,r,n[r])})}return t}function il(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var wo=function(o,n){var a=En({},o,n.attrs);return e.createVNode(Ce,En({},a,{icon:ll}),null)};wo.displayName="DownOutlined",wo.inheritAttrs=!1;const sl=wo;var cl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const dl=cl;function Bn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){pl(t,r,n[r])})}return t}function pl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var xo=function(o,n){var a=Bn({},o,n.attrs);return e.createVNode(Ce,Bn({},a,{icon:dl}),null)};xo.displayName="InfoCircleOutlined",xo.inheritAttrs=!1;const fl=xo;var ul={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 ml=ul;function On(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){hl(t,r,n[r])})}return t}function hl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ko=function(o,n){var a=On({},o,n.attrs);return e.createVNode(Ce,On({},a,{icon:ml}),null)};ko.displayName="MinusCircleOutlined",ko.inheritAttrs=!1;const yl=ko;var gl={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 bl=gl;function Vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Cl(t,r,n[r])})}return t}function Cl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var _o=function(o,n){var a=Vn({},o,n.attrs);return e.createVNode(Ce,Vn({},a,{icon:bl}),null)};_o.displayName="PlusCircleOutlined",_o.inheritAttrs=!1;const wl=_o;var xl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const kl=xl;function In(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){_l(t,r,n[r])})}return t}function _l(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var So=function(o,n){var a=In({},o,n.attrs);return e.createVNode(Ce,In({},a,{icon:kl}),null)};So.displayName="PlusOutlined",So.inheritAttrs=!1;const Sl=So;var Al={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 Nl=Al;function $n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Tl(t,r,n[r])})}return t}function Tl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ao=function(o,n){var a=$n({},o,n.attrs);return e.createVNode(Ce,$n({},a,{icon:Nl}),null)};Ao.displayName="SettingOutlined",Ao.inheritAttrs=!1;const Ll=Ao,El=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Gr,CaretDownOutlined:Mr,AInputSearch:v.InputSearch,ASpin:v.Spin,APagination:v.Pagination,Draggable:ft},setup(){var _;const t=(_=window==null?void 0:window.config)==null?void 0:_.pageId,o=e.inject(Le),n=e.unref(e.inject(Ee)),a=e.inject(ve),r=e.computed(()=>{var g;return(g=e.unref(a))==null?void 0:g.graphicConfig}),l=e.computed(()=>{var g;return(g=e.unref(r))==null?void 0:g.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const g={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const x=await o.post(`${ke}/diagram/sourceList`,g,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:O,data:S={}}=x.data;if(O){const{rows:V=[],total:F=0}=S;V==null||V.forEach($=>{var P;$.show=!1,(P=$.dataViewColumns)==null||P.forEach(y=>{y.show=!0,y.edit=!1,y.title&&(y.label=y.title)})}),i.value=V,s.totalResult=+F}}catch{d.value=!1}},f=g=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[g],m=g=>{i.value[g].show=!i.value[g].show},h=()=>{s.currentPage=1,p()},w=ne.debounce(()=>{s.currentPage=1,p()},200),b=(g,x)=>{s.pageSize=x,s.currentPage=g,p()};e.onMounted(()=>{p()});const N=e.inject(pe),E=e.computed(()=>{const g=["classificationList","rowHeaderList","dimensionList"];let x=[];for(const O in e.unref(N))if(Object.prototype.hasOwnProperty.call(e.unref(N),O)&&g.includes(O)){const S=e.unref(N)[O];Array.isArray(S)&&(x=x.concat(S))}return x});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:m,mapScope:f,onSearch:h,onChange:w,onPaginationChange:b,searchText:c,setItemDisabled:(g=[])=>{let x=!1;for(const O of e.unref(E))if(!g.find(V=>V.typeGuid===O.typeGuid)){x=!0;break}return x},onDragStart:(g,x)=>{const O=x[g.oldIndex];O&&sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}}}}),gf="",Bl={class:"data-source-list"},Ol={class:"columns"},Vl={class:"column-item"},Il=["onClick"],$l={key:0},Fl={class:"column-child-item"},Dl={class:"column-child-item-name"};function vl(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),f=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Bl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=m=>t.searchText=m),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Ol,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,h)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Vl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(h)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name),1)],8,Il)]),m.show?(e.openBlock(),e.createElementBlock("div",$l,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":w=>m.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:w=>t.onDragStart(w,m.dataViewColumns)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",Fl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",Dl,e.toDisplayString(w.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(f,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=m=>t.pagination.pageSize=m),total:t.pagination.totalResult,"show-total":m=>`共 ${m} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=m=>t.pagination.currentPage=m),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Pl=te(El,[["render",vl],["__scopeId","data-v-dfb51d34"]]),Ml=e.defineComponent({name:"DataList",components:{DataSourceList:Pl,DataViewList:Ua},setup(){return{source:e.inject(Zt)}}});function jl(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Rl=te(Ml,[["render",jl]]),Fn={mounted(t){t.focus()}},Ul=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:ft,AModal:v.Modal,AButton:v.Button},setup(t,{expose:o}){var B;const n=(B=window==null?void 0:window.config)==null?void 0:B.pageId,a=e.inject(Le),r=e.unref(e.inject(Ee)),l=e.inject(pe),i=e.inject(Be),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const _=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:g,data:x=[]}=_.data;g&&(c.value=x==null?void 0:x.slice(0,200))}catch(_){console.error(_)}},f=()=>{var S;const _=((S=e.unref(l)[t.type])==null?void 0:S.slice())||[],g=_[t.index],{label:x,name:O}=t.item;g.sort={label:x,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:_})};let m=!1;const h=()=>{m=!0},w=e.ref(!1),b=()=>{w.value=!0},N=()=>{w.value=!1},E=()=>{m&&f(),m=!1,N()};return o({showModal:b}),e.watch(w,_=>{var g,x;if(_){const O=(x=(g=t.item)==null?void 0:g.sort)==null?void 0:x.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!_)},{flush:"post"}),{visible:w,onCancel:E,customSortList:c,onChange:h,onDeleteConfig:()=>{var S;const _=((S=e.unref(l)[t.type])==null?void 0:S.slice())||[],g=_[t.index],{label:x,name:O}=t.item;g.sort={label:x,columnName:O},i({[t.type]:_}),N()}}}}),bf="",Gl={class:"button-wrapper"},zl={class:"sort-item"};function Hl(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Gl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",zl,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Wl=te(Ul,[["render",Hl],["__scopeId","data-v-8e16d201"]]),ql=e.defineComponent({name:"CustomGroupModal",directives:{focus:Fn},components:{CloseOutlined:yo,AModal:v.Modal,ASelect:v.Select,ASelectOption:v.SelectOption,AButton:v.Button,AInput:v.Input,ACheckbox:v.Checkbox,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ATag:v.Tag,ACheckableTag:v.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var U;const n=e.inject(Le),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(Ee));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const k=e.unref(c).map(T=>T.title);return new Set(k)}),f=e.ref([]);e.watch(()=>e.unref(c).length,k=>{f.value=new Array(k).fill(!1)});const m=e.computed(()=>{let k=0;return e.unref(c).forEach(T=>{var L;(L=T.data)==null||L.forEach(M=>{M.checked&&k++})}),k}),h=()=>{const k=e.unref(d);if(!k){v.message.error("创建分组名不能空");return}e.unref(p).has(k)?v.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:k,data:[]}),l=!0)},w=k=>{e.unref(c).splice(k,1),l=!0},b=e.ref(null),N=()=>{if(e.unref(m)===0){v.message.error("当前移入分组已选个数为0");return}const k=e.unref(b);if(k==null){v.message.error("请选择移入分组");return}if(!e.unref(c)[k]){v.message.error("移入分组不存在,请重新选择");return}const T=[],L=e.unref(c).length;for(let M=0;M<L;M++){const j=e.unref(c)[M];e.unref(c)[M].data=j.data.filter(W=>(W.checked&&T.push({...W,checked:!1}),!W.checked))}e.unref(c)[k].data=[...T,...e.unref(c)[k].data],l=!0},E=k=>{e.unref(f)[k]=!0},u=k=>{e.unref(f)[k]=!1},B=(k,T)=>{const L=k.target.value;e.unref(p).has(L)&&v.message.error("组名不能相同,请修改"),e.unref(c)[T].title=L,l=!0},_=e.inject(pe),g=e.inject(Be),x=e.computed(()=>e.unref(_).source),O=e.computed(()=>e.unref(_).dataViewId),S=e.ref(!1),V=()=>{var K,J;const k=e.unref(c);let T="";e.unref(S)&&(T=(K=k[0])==null?void 0:K.title);const L=k==null?void 0:k.length,M={};for(let ee=1;ee<L;ee++){const ie=k[ee]||{},{title:fe,data:ue}=ie;M[fe]=(ue==null?void 0:ue.map(Ie=>Ie.label))||[]}const j=((J=e.unref(_)[t.type])==null?void 0:J.slice())||[],W=j[t.index];W.customGroup={groupInfoMap:M,otherGroupName:T},g({[t.type]:j})},F=e.ref(!1),$=()=>{F.value=!0},P=()=>{F.value=!1},y=()=>{P(),l&&V(),l=!1},C=()=>{l=!0},A=new Set,I=async()=>{const k=t.item.customGroup||{},T=k.otherGroupName,L=k.groupInfoMap;(T===""||T==null)&&(S.value=!1),e.unref(c)[0]={title:T||"未分组",data:[]};let M=1;for(const j in L)if(Object.prototype.hasOwnProperty.call(L,j)){const K=L[j].map(J=>(A.add(J),{label:J,checked:!1}));e.unref(c)[M]={title:j,data:K},M++}await D()},D=async()=>{var k;try{const T=await n.post(`${ke}/diagram/groupvalue`,{source:e.unref(x),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:L,data:M=[]}=T.data;if(L){const j=[];(k=M==null?void 0:M.slice(0,200))==null||k.forEach(W=>{A.has(W)||j.push({label:W,checked:!1})}),e.unref(c)[0].data=j}}catch(T){console.error(T)}};return e.watch(F,k=>{k&&I(),window.changeShowTable&&window.changeShowTable(!k)},{flush:"post"}),o({showModal:$}),{visible:F,title:i,activeKey:s,customGroupList:c,onCancel:y,useOtherGroup:S,selectCount:m,createGroupTitle:d,onAddGroup:h,onDeleteGroup:w,onMoveInGroup:N,selectGroupIndex:b,onEditTitle:E,onTitleChange:B,onFinishEditTitle:u,onUseOtherGroup:C,customGroupEditTitleList:f}}}),Cf="",wf="",Yl={class:"custom-group-header"},Kl={class:"move-and-create"},Xl={class:"select-tip"},Ql={class:"select-count"},Jl={class:"create-group"},Zl={class:"custom-group-content"},ei=["onClick"],ti={class:"extra"},oi={class:"custom-group-list"},ni={class:"text"};function ai(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),f=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),b=e.resolveComponent("a-collapse"),N=e.resolveComponent("a-modal"),E=e.resolveDirective("focus");return e.openBlock(),e.createBlock(N,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Yl,[e.createElementVNode("div",Kl,[e.createElementVNode("div",null,[e.createElementVNode("span",Xl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Ql,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=u=>t.selectGroupIndex=u),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(u,B)=>(e.openBlock(),e.createBlock(i,{key:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Jl,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=u=>t.createGroupTitle=u),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=u=>t.useOtherGroup=u),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Zl,[e.createVNode(b,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=u=>t.activeKey=u),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(u,B)=>(e.openBlock(),e.createBlock(w,{key:B},{header:e.withCtx(()=>[t.customGroupEditTitleList[B]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:u.title,size:"small",onChange:_=>t.onTitleChange(_,B),onBlur:_=>t.onFinishEditTitle(B),onPressEnter:_=>t.onFinishEditTitle(B)},null,8,["value","onChange","onBlur","onPressEnter"])),[[E]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(_=>t.onEditTitle(B),["prevent","stop"])},e.toDisplayString(u.title),9,ei))]),extra:e.withCtx(()=>[e.createElementVNode("div",ti,[B===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(f,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),B!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(_=>t.onDeleteGroup(B),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.data,(_,g)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:_.checked,"onUpdate:checked":x=>_.checked=x,class:"custom-group",key:g},{default:e.withCtx(()=>[e.createElementVNode("span",ni,e.toDisplayString(_.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ri=te(ql,[["render",ai],["__scopeId","data-v-7e3049d2"]]);var li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},No={},ii={get exports(){return No},set exports(t){No=t}};(function(t,o){(function(n,a){t.exports=a()})(li,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var f=this.$utils(),m=!!f.u(p)||p;if(f.p(c)===a){var h=this.quarter()-1;return m?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(ii);const si=No;se.extend(si);const ci=e.defineComponent({name:"Condition",components:{CloseOutlined:yo,DownOutlined:sl,AppstoreAddOutlined:kn,ASelect:v.Select,AInput:v.Input,ADatePicker:v.DatePicker,AButton:v.Button,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem,ASubMenu:v.SubMenu,APopover:v.Popover,ATabs:v.Tabs,ATabPane:v.TabPane,ARadioGroup:v.RadioGroup,ARadio:v.Radio,AInputNumber:v.InputNumber,ASelectOption:v.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var Ie,Ye,Ke,Xe,Qe,ze,Je,dt,pt;const o=(Ie=window==null?void 0:window.config)==null?void 0:Ie.pageId,n=e.inject(pe),a=e.inject(Le),r=e.unref(e.inject(Ee)),l=e.inject(Jo),i=e.inject(Re),d=e.computed(()=>{var H;const R=[];return(H=e.unref(i))==null||H.forEach(X=>{const{keyName:Q="",id:Z="",type:ce}=X;ce==="ecanRangePicker"?R.push({value:`${Z}-startTime`,label:`${Q||Z}-开始时间值`,keyName:`${Q||Z}-startTime`,id:Z},{value:`${Z}-endTime`,label:`${Q||Z}-结束时间值`,keyName:`${Q||Z}-endTime`,id:Z}):R.push({value:Z,label:`${Q||Z}`,keyName:`${Q||Z}`,id:Z})}),R}),s=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.dataViewId}),c=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.source}),p=e.ref(!1),f={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},m=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],h=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),w=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),b=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],N=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],E=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],u=e.ref({fieldName:(Ye=t.data)==null?void 0:Ye.fieldName,fieldType:(Ke=t.data)==null?void 0:Ke.fieldType,rule:(Xe=t.data)==null?void 0:Xe.rule,id:(Qe=t.data)==null?void 0:Qe.id,fieldValue:B(),label:(ze=t.data)==null?void 0:ze.label,targetSource:"",typeGuid:(Je=t.data)==null?void 0:Je.typeGuid,dataType:((dt=t.data)==null?void 0:dt.dataType)||"",componentId:((pt=t.data)==null?void 0:pt.componentId)||""});function B(){const{fieldType:R="",dataType:H="",fieldValue:X=""}=t.data;if(R==="DATE"&&H==="time")return se(X);if(H==="component"){const Q=e.unref(d).find(Z=>Z.keyName===X);return Q?Q.value:X}else return X}const _=e.ref(!1),g=e.computed(()=>u.value.fieldType==="DATE"),x=e.computed(()=>{const R=t.type;let H=[];const X=["classificationList","seriesList","rowHeaderList","dimensionList"];if(X.includes(R)){let Q=[];for(const Z in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),Z)&&!["controlList","sqlConditions"].includes(Z)){const ce=e.unref(n)[Z];Array.isArray(ce)&&(X.includes(Z)?Q=Q.concat(ce.filter(me=>me.show)):Q=Q.concat(ce))}H=Q}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(R)&&(H=e.unref(l));return H.map(Q=>({...Q,label:Q.title||Q.label,value:Q.name}))}),{updateCondition:O,deleteCondition:S}=e.inject(Qo,{updateCondition:(R,H,X)=>{},deleteCondition:(R,H)=>{}}),V=()=>{S(t.level,t.index)};e.watch(u,R=>{const H=ne.cloneDeep(R);R.fieldType==="DATE"&&R.dataType!=="component"&&R.fieldValue&&(H.fieldValue=R.fieldValue.format(R.dateFormat)),O(H,t.level,t.index)},{deep:!0});const F=R=>{const H=e.unref(x).find(G=>G.value===R)||{},{name:X,genericType:Q,id:Z,label:ce,typeGuid:me}=H;u.value={id:Z,fieldName:X,fieldType:Q,label:ce,rule:"",fieldValue:Q==="DATE"?null:void 0,targetSource:"",typeGuid:me,dataType:""}},$=R=>{const H=e.unref(d).find(X=>X.value===R)||{};e.unref(u).componentId=H.id||""},P=e.computed(()=>{const R=e.unref(u).fieldType;return R==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:R==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:R==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),y=e.computed(()=>{let R="";const H=e.unref(P).find(X=>X.value===e.unref(u).rule);return H&&(R=H.label),R}),C=e.computed(()=>{let R={fontSize:"12px"};return e.unref(y)||(R={...R,position:"absolute",right:"11px",top:"9px"}),R}),A=e.ref([]),I=async()=>{var R;if(!(e.unref(A).length>0))try{const H=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(c),dataViewId:e.unref(s),groupColumn:e.unref(u).fieldName,hrpIndexTypeGuid:e.unref(u).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:Q=[]}=H.data;X&&(A.value=(R=Q==null?void 0:Q.slice(0,200))==null?void 0:R.map(Z=>({label:Z,value:Z})))}catch(H){console.error(H)}},D=R=>{e.unref(u).rule=R,e.unref(u).fieldValue=e.unref(u).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(R)&&I()},U=R=>{e.unref(u).dataType=R,e.unref(u).fieldValue=""},k=e.ref(),T=R=>{k.value=R,e.unref(u).fieldValue=(R==null?void 0:R.join(","))||""},L=R=>{const{keyPath:H}=R;e.unref(u).rule=H[0],e.unref(u).dataType=H[1],e.unref(u).dateFormat=H[2],e.unref(u).fieldValue=""};e.onMounted(()=>{var Q,Z,ce,me,G,z,q;if(u.value.dataType=((Q=t.data)==null?void 0:Q.dataType)||"",u.value.componentId=((Z=t.data)==null?void 0:Z.componentId)||"",e.unref(u).fieldType==="DATE"){const{activeKey:Y,dateCalcTypes:le=[]}=t.data||{};if(e.unref(u).dateFormat=(ce=t.data)==null?void 0:ce.dateFormat,e.unref(u).activeKey=Y,e.unref(u).calcWays=((me=t.data)==null?void 0:me.calcWays)||[],e.unref(u).dateCalcTypes=le,Y===5){const re=e.unref(u).calcWays[0];if(re){const oe=re.split("-");e.unref(h).expression=oe[0],e.unref(h).around=oe[1]}e.unref(h).unit=le[0]||"YEAR"}else{e.unref(u).radioValue=((G=t.data)==null?void 0:G.radioValue)||"";const re=e.unref(w).find(oe=>{var xe;return oe.key===((xe=t.data)==null?void 0:xe.activeKey)});re&&ie(re,t.data)}}else k.value=((q=(z=t.data)==null?void 0:z.fieldValue)==null?void 0:q.split(","))||[];const{fieldType:R,fieldName:H,rule:X}=u.value;R!=="DATE"&&H&&X&&["IN","NOT_IN"].includes(X)&&I()});const M=R=>{if(e.unref(u).activeKey===R){e.unref(w)[R].radioValue=e.unref(u).radioValue,e.unref(w)[e.unref(u).activeKey]&&(e.unref(w)[e.unref(u).activeKey].radioValue=e.unref(u).radioValue,e.unref(u).radioValue==="1"?e.unref(w)[R].beforeNum=e.unref(u).calcWays[0]:e.unref(u).radioValue==="2"&&(e.unref(w)[R].afterNum=e.unref(u).calcWays[0]));return}e.unref(w).forEach(H=>{H.beforeNum=0,H.afterNum=0,H.radioValue="1",H.value=""})},j=(R,H)=>{p.value=!0;const X=R.target.value,Q=H.type,Z=e.unref(u).dateFormat,ce=Math.abs(H.beforeNum),me=H.afterNum;H.value=fe(X,Q,Z,ce,me)},W=R=>{const H=e.unref(u).activeKey;if(R!==H)return;let X="";H===0?X="years":H===1?X="quarters":H===2?X="months":H===3?X="weeks":H===4&&(X="days");const Q=e.unref(u).dateFormat,Z=e.unref(u).radioValue;let ce=0,me=0;return Z==="1"?ce=Math.abs(e.unref(u).calcWays[0]):Z==="2"&&(me=e.unref(u).calcWays[0]),fe(Z,X,Q,ce,me)},K=(R,H,X,Q)=>{if(p.value=!0,H.radioValue===Q){const Z=R.target.value;X==="+"?H.value=se().add(Z,H.type).format(e.unref(u).dateFormat):H.value=se().subtract(Z,H.type).format(e.unref(u).dateFormat)}},J=(R,H)=>{(e.unref(u).fieldType!=="DATE"||e.unref(u).dataType!=="component")&&(u.value.fieldValue=se(R.value,e.unref(u).dateFormat)),e.unref(u).calcWays||(e.unref(u).calcWays=[]),e.unref(u).activeKey=H,e.unref(u).radioValue=R.radioValue,R.radioValue==="1"?e.unref(u).calcWays[0]="-"+R.beforeNum:R.radioValue==="2"?e.unref(u).calcWays[0]=R.afterNum:R.radioValue==="3"?H===4?e.unref(u).calcWays[0]="0":e.unref(u).calcWays[0]="BEGIN":R.radioValue==="4"&&(e.unref(u).calcWays[0]="END"),H===0?e.unref(u).dateCalcTypes=["YEAR"]:H===1?e.unref(u).dateCalcTypes=["QUARTER"]:H===2?e.unref(u).dateCalcTypes=["MONTH"]:H===3?e.unref(u).dateCalcTypes=["WEEK"]:H===4&&(e.unref(u).dateCalcTypes=["DAY"]),_.value=!1},ee=()=>{e.unref(u).activeKey=5,e.unref(u).dateCalcTypes=[e.unref(h).unit],e.unref(u).calcWays[0]=`${e.unref(h).expression}-${e.unref(h).around}`,_.value=!1};function ie(R,H){const{radioValue:X="",calcWays:Q=[]}=H;R.radioValue=X,Q!=null&&Q.length&&(X==="1"?R.beforeNum=Math.abs(Q[0]):X==="2"&&(R.afterNum=Q[0]))}function fe(R,H,X,Q,Z){if(R==="1")return se().subtract(Q,H).format(X);if(R==="2")return se().add(Z,H).format(X);if(R==="3"){if(H==="years")return se().startOf("year").format(X);if(H==="quarters")return se().startOf("quarter").format(X);if(H==="months")return se().startOf("month").format(X);if(H==="days")return se().format(X)}else if(R==="4"){if(H==="years")return se().endOf("year").format(X);if(H==="quarters")return se().endOf("quarter").format(X);if(H==="months")return se().endOf("month").format(X)}return""}return{fieldOptions:x,ruleOptions:P,onFieldChange:F,condition:u,valueOptions:A,onRuleChange:D,onDataTypeChange:U,onFieldValueSelectChange:T,fieldValues:k,onDelete:V,isDateType:g,formatList:m,tabDateList:w,compareList:b,menuRule:N,dateBtnLabel:y,downIconStyle:C,popoverVisible:_,dateRadioStyle:f,showTime:p,controlList:d,dataTypeList:E,customTabData:h,handleMenuClick:L,changeTabInitDate:M,changeRadioValue:j,getFieldValue:W,blurCompare:K,okDatePickConfig:J,onChangeComponent:$,filterOption:(R,H)=>H.label.toLowerCase().indexOf(R.toLowerCase())>=0,okCustomConfig:ee}}}),xf="",kf="",di={class:"condition"},pi=["title"],fi={class:"rule"},ui={class:"data-type"},mi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},hi={class:"popover-content-wrap"},yi={class:"tabFilterRadio"},gi={key:0},bi={key:1},Ci={style:{"margin-left":"10px"}},wi={style:{"margin-left":"10px"}},xi={style:{position:"absolute",bottom:"10px"}},ki={style:{display:"flex"}},_i={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function Si(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),f=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),b=e.resolveComponent("a-input-number"),N=e.resolveComponent("a-radio"),E=e.resolveComponent("a-radio-group"),u=e.resolveComponent("a-tab-pane"),B=e.resolveComponent("a-tabs"),_=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),x=e.resolveComponent("a-input"),O=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",di,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(S,V)=>(e.openBlock(),e.createBlock(i,{key:V,value:S.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:S.label},e.toDisplayString(S.label),9,pi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",fi,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,S=>(e.openBlock(),e.createBlock(c,{key:S.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value?"color: #1890FF;":"")},e.toDisplayString(S.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,V=>{var F;return e.openBlock(),e.createBlock(c,{key:V.value,disabled:V.value==="component"&&!((F=t.controlList)!=null&&F.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===V.value?"color: #1890FF;":"")},e.toDisplayString(V.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,$=>(e.openBlock(),e.createBlock(s,{key:$.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===V.value&&t.condition.dateFormat===$.value?"color: #1890FF;":"")},e.toDisplayString($.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(f,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",ui,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(S,V)=>(e.openBlock(),e.createBlock(i,{key:V,value:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",mi,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(w,{key:0,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=S=>t.condition.fieldValue=S),format:t.condition.dateFormat},null,8,["value","format"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(g,{visible:t.popoverVisible,"onUpdate:visible":o[8]||(o[8]=S=>t.popoverVisible=S),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",hi,[e.createVNode(B,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(S,V)=>(e.openBlock(),e.createBlock(u,{key:V,tab:S.label},{default:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(E,{value:S.radioValue,"onUpdate:value":F=>S.radioValue=F,onChange:F=>t.changeRadioValue(F,S)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",gi,"相对当前时间:"+e.toDisplayString(S.value),1)):(e.openBlock(),e.createElementBlock("div",bi,"相对当前时间:"+e.toDisplayString(t.getFieldValue(V)),1)),e.createVNode(N,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(b,{value:S.beforeNum,"onUpdate:value":F=>S.beforeNum=F,min:0,onBlur:F=>t.blurCompare(F,S,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Ci,e.toDisplayString(S.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(N,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(b,{value:S.afterNum,"onUpdate:value":F=>S.afterNum=F,min:0,onBlur:F=>t.blurCompare(F,S,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",wi,e.toDisplayString(S.afterLabel),1)]),_:2},1032,["style"]),S.beforeText?(e.openBlock(),e.createBlock(N,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),S.afterText?(e.openBlock(),e.createBlock(N,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",xi,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[2]||(o[2]=F=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:F=>t.okDatePickConfig(S,V)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(u,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ki,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[3]||(o[3]=S=>t.customTabData.expression=S),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[4]||(o[4]=S=>t.customTabData.unit=S),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[5]||(o[5]=S=>t.customTabData.around=S)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",_i,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[6]||(o[6]=S=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[7]||(o[7]=S=>{t.popoverVisible=!0})},[e.createVNode(_)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[9]||(o[9]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(x,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=S=>t.condition.fieldValue=S)},null,8,["value"])),e.createVNode(O,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Ai=te(ci,[["render",Si],["__scopeId","data-v-9706f7ef"]]),Ni=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Ai}}),_f="",Ti={key:0,class:"condition-list"},Li={key:0,class:"condition-container"},Ei={key:0,class:"condition-text"},Bi={key:1,class:"condition-text"},Oi={class:"conditions"};function Vi(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Li,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",Ei,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Bi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Oi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Ii=te(Ni,[["render",Vi],["__scopeId","data-v-86c0c5aa"]]),$i=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:v.Select,AInput:v.Input,AInputNumber:v.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=ne.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Sf="",Dn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Fi={class:"truncations"},Di={class:"rule"},vi={class:"field-value"},Pi={class:"field-value"},Mi=Dn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),ji=Dn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ri=["onClick"];function Ui(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",Di,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":f=>c.rule=f,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",vi,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":f=>c.num=f,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",Pi,[Mi,e.createVNode(s,{value:c.name,"onUpdate:value":f=>c.name=f,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),ji]),e.createElementVNode("div",{class:"clear-truncation",onClick:f=>t.clearData(c)},"清空",8,Ri)]))),128))])}const Gi=te($i,[["render",Ui],["__scopeId","data-v-f543c690"]]),Ve=(t,o)=>{if(typeof t=="string"&&typeof o=="string")return t.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const r=o[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},zi=t=>t.replace(/\\n/g,`
59
+ `),To=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),It=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...It(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},vn=(t,o)=>{var N;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,f=[],m=[...a,...r,...l,...i,...d,...s,...c,...p],h=[];for(const E of m){const u=It((E==null?void 0:E.conditions)||[]);if(u!=null&&u.length){const B=u.filter(_=>Pn(_,o)?(_==null?void 0:_.dataType)==="component":!1).map(_=>{const g=Pn(_,o),x={};return _!=null&&_.dateFormat&&(x.format=_.dateFormat),{conditionKey:_.fieldName,conditionLabel:_.fieldName,conditionName:_.fieldName,conditionValueType:_.fieldType,id:g.id,keyName:_.fieldValue,rule:_.rule,notGlobal:!0,...x}});if(B!=null&&B.length)for(const _ of B)h.find(g=>g.keyName===_.keyName)||h.push(_)}}const w=n.concat(h),b=w.length;for(let E=0;E<b;E++){const u=w[E];if(u&&!((N=Object.keys(u))!=null&&N.length)||(u==null?void 0:u.conditionKey)==="parentCode")continue;const{id:B,keyName:_,conditionLabel:g,conditionKey:x,conditionValueType:O,prop:S,rule:V="NONE",notGlobal:F=!1,format:$}=u;let P=_||B;P&&S&&(P+=`-${S}`);const y=o.find(L=>L.id===B),C={rule:V,label:g,fieldName:x,fieldValue:"",valueType:O,alias:P,globalCondition:!F},{value:A,format:I="YYYY-MM-DD",operate:D,type:U="",useCurrentTime:k}=y||{},T=$||I;if(Ve(U,"date")){let L;if(k?L=se():L=se(A),D&&A){const{mode:M,type:j,value:W}=D;if(W)switch(j){case"add":L=L.add(W,M);break;case"minus":L=L.subtract(W,M);break}}C.fieldValue=(L==null?void 0:L.format(T))||"",C.dateFormat=T}else if(U==="ecanRangePicker"){const{interval:L,intervalUnit:M}=y||{};let j=S;if(!S){const K=_==null?void 0:_.split("-");K!=null&&K.length&&(j=K[K.length-1])}if(!j)return;let W=null;if(k&&(j==="startTime"?W=se().subtract(L,M):j==="endTime"&&(W=se())),y[j]&&(W=se(y[j])),D){const{type:K,value:J,mode:ee}=D;switch(K){case"add":W=W&&W.add(J,ee);break;case"minus":W=W&&W.subtract(J,ee)}}W&&(C.fieldValue=W==null?void 0:W.format(T)),C.dateFormat=T}else{const L=A&&A.match(/\{(.+?)\}/g);L!=null&&L.length?C.fieldValue="":C.fieldValue=A}f.push(C)}for(let E=f.length-1;E>=0;E--){const u=f[E];u.globalCondition||f.find(_=>_.alias===u.alias&&_.globalCondition)&&f.splice(E,1)}return f},$t=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break;case"ecanImage":o="click";break}return o};function Pn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let Lo=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const Hi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Ii,TruncationList:Gi,AModal:v.Modal,AButton:v.Button,ATabs:v.Tabs,ATabPane:v.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var y;return`添加过滤条件-${((y=t.item)==null?void 0:y.label)||""}`},r=e.inject(pe),l=e.inject(Be),i=e.inject(Re),d=e.computed(()=>{var y;return(y=e.unref(r))==null?void 0:y.dataSourceId}),s=e.inject(ve),c=e.inject(Lt),p=e.ref([]),f=e.ref([]),m=e.ref(!1);e.watch(m,y=>{var C,A,I,D;y&&(Array.isArray((C=t.item)==null?void 0:C.conditions)&&(p.value=ne.cloneDeep((A=t.item)==null?void 0:A.conditions)||[]),Array.isArray((I=t.item)==null?void 0:I.truncations)?f.value=ne.cloneDeep((D=t.item)==null?void 0:D.truncations)||[]:f.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"});let h=!1;const w=y=>{var C;h=!0,e.unref(p)==null||((C=e.unref(p))==null?void 0:C.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==y?p.value=[{join:y,conditions:[e.unref(p)[0],{keyValue:Lo()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===y&&p.value[0].conditions.push({keyValue:Lo()}))};e.provide(Qo,{updateCondition(y,C,A){var D;h=!0;let I=e.unref(p);for(let U=0;U<C&&I[0];U++)I=(D=I[0])==null?void 0:D.conditions;Array.isArray(I)&&I[A]&&(I[A]=y)},deleteCondition(y,C){var I,D;h=!0;let A=e.unref(p);for(let U=0;U<y&&A[0];U++)A=(I=A[0])==null?void 0:I.conditions;if(Array.isArray(A)&&A[C]&&(A.splice(C,1),A.length===1)){let U=e.unref(p);const k=y-2>0?y-2:0;for(let T=0;T<k&&U[0];T++)U=(D=U[0])==null?void 0:D.conditions;U[0].join===A[0].join?U[0].conditions=[...A[0].conditions,...U[0].conditions.slice(1)]:U[0]=A[0]}}});const b=y=>{h=!0,f.value=y},N=e.computed(()=>{var C;const y=[];return(C=e.unref(i))==null||C.forEach(A=>{const{keyName:I="",id:D="",type:U}=A;U==="ecanRangePicker"?y.push({value:`${D}-startTime`,label:`${I||D}-开始时间值`,keyName:`${I||D}-startTime`},{value:`${D}-endTime`,label:`${I||D}-结束时间值`,keyName:`${I||D}-endTime`}):y.push({value:D,label:`${I||D}`,keyName:`${I||D}`})}),y}),E=()=>{var k,T;const{controlList:y=[]}=e.unref(r),C=((k=e.unref(r)[t.type])==null?void 0:k.slice())||[],A=It(ne.cloneDeep(C[t.index].conditions));C[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((T=e.unref(f))!=null&&T.length)&&(C[t.index].truncations=e.unref(f));const I=It(e.unref(p));for(const L of I)if(L.dataType==="component"&&L.fieldValue){const M=e.unref(N).find(j=>j.value===L.fieldValue);M&&(L.fieldValue=M.keyName)}const D=A.filter(L=>!I.find(M=>M.componentId===L.componentId)).filter(L=>!y.find(M=>M.id===L.componentId)),U=I.filter(L=>!A.find(M=>M.componentId===L.componentId));u(D,U),l({[t.type]:C,sqlConditions:vn({...e.unref(r),[t.type]:C},e.unref(i))})};function u(y,C){var I;const A=y.map(D=>({...D,delete:!0})).concat(C.map(D=>({...D,add:!0})));for(const D of A){const U=e.unref(i).find(k=>k.id===D.componentId);if(U){const{type:k,id:T,events:L=[]}=U,M=$t(k);if(D.add)L.find(j=>{var W;return j.on===M&&j.target===((W=e.unref(s))==null?void 0:W.id)&&j.emit==="refreshData"})||c({id:T,events:[...L,{on:M,target:(I=e.unref(s))==null?void 0:I.id,emit:"refreshData"}].reverse()});else if(D.delete){const j=L.findIndex(W=>{var K;return W.on===M&&W.target===((K=e.unref(s))==null?void 0:K.id)&&W.emit==="refreshData"});j!==-1&&(L.splice(j,1),c({id:T,events:L}))}}}}const B=()=>{m.value=!0},_=()=>{p.value=[],m.value=!1},g=()=>{h&&E(),h=!1,_()},x=()=>{_()},O=e.inject(Le),S=e.unref(e.inject(Ee)),V=(P=window==null?void 0:window.config)==null?void 0:P.pageId,F=e.ref([]);e.provide(Jo,F);const $=async y=>{var C;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:A,indexCode:I}=y,D=await O.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:V,dataSourceId:e.unref(d),indexGuid:A,indexCode:I},{headers:{Authentication:S,operateContext:"ygt"}}),{success:U,data:k=[]}=D.data;U&&((C=k==null?void 0:k.dataViewColumns)!=null&&C.length)&&(F.value=k.dataViewColumns)}catch(A){console.error(A)}};return e.watch(()=>t.item,y=>{y&&m.value&&$(y)}),o({showModal:B}),{visible:m,onOk:g,onCancel:x,handleTitle:a,conditionList:p,truncationList:f,addCondition:w,onUpdatetruncation:b,activeKey:n}}}),Af="",Wi={class:"header"},qi={class:"header"};function Yi(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(f,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=m=>t.activeKey=m)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=m=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",qi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=m=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const Ki=te(Hi,[["render",Yi],["__scopeId","data-v-552c795f"]]),Xi=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:v.Input,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Be),l=e.ref(),i=p=>{const{showLabel:f="",label:m=""}=p;l.value=f||m||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var f;const p=((f=e.unref(a)[t.type])==null?void 0:f.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),Nf="",Qi=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Ji={class:"config-name"},Zi=Qi(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function es(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[Zi,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const ts=te(Xi,[["render",es],["__scopeId","data-v-de6a1755"]]),os=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Be),l=e.inject(Re),i=e.inject(ve),d=e.inject(Lt),s=e.ref(),c=e.computed(()=>{var E;return(E=e.unref(l))==null?void 0:E.filter(u=>u.keyName!=="")});let p=[];const f=E=>{const{sortCpnts:u=[]}=E;p=ne.cloneDeep(u),s.value=ne.cloneDeep(u),n.value=!0},m=()=>{n.value=!1},h=()=>{var g;const{controlList:E=[]}=e.unref(a),u=p.filter(x=>!e.unref(s).includes(x)).filter(x=>!E.find(O=>O.id===x)),B=e.unref(s).filter(x=>!p.includes(x)).filter(x=>!E.find(O=>O.id===x)),_=u.map(x=>({componentId:x,delete:!0})).concat(B.map(x=>({componentId:x,add:!0})));for(const x of _){const O=e.unref(l).find(S=>S.id===x.componentId);if(O){const{type:S,id:V,events:F=[]}=O,$=$t(S);if(x.add)F.find(P=>{var y;return P.on===$&&P.target===((y=e.unref(i))==null?void 0:y.id)&&P.emit==="refreshData"})||d({id:V,events:[...F,{on:$,target:(g=e.unref(i))==null?void 0:g.id,emit:"refreshData"}].reverse()});else if(x.delete){const P=F.findIndex(y=>{var C;return y.on===$&&y.target===((C=e.unref(i))==null?void 0:C.id)&&y.emit==="refreshData"});P!==-1&&(F.splice(P,1),d({id:V,events:F}))}}}},w=()=>{var u;h();const E=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];E[t.index].sortCpnts=s.value,r({[t.type]:E}),m()},b=()=>{m()},N=(E,u)=>{var B;return(B=u==null?void 0:u.keyName)==null?void 0:B.toLowerCase().includes(E==null?void 0:E.toLowerCase())};return o({showModal:f}),{visible:n,onOk:w,onCancel:b,idFilterOption:N,fieldName:s,usedComponentList:c}}}),Tf="",ns=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),as={class:"sort-by-cpnt"},rs=ns(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function ls(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",as,[rs,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const is=te(os,[["render",ls],["__scopeId","data-v-2943f455"]]),Eo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:Eo(t,r.children)&&(n=Eo(t,r.children)))}return n},ss=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:v.Row,ACol:v.Col,ATextarea:v.Textarea,APopover:v.Popover,AInputSearch:v.InputSearch,ATree:v.Tree,DoubleRightOutlined:al},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Le),a=e.unref(e.inject(Ee)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const x=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(x==null?void 0:x.filter(O=>O.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:x=>{o("update:value",x),o("change",x)}}),f=e.ref(""),m=x=>{const O=document.getElementById("calTextArea");let S=p.value;if(document.selection){const V=document.selection.createRange();V.text=x}else if(typeof O.selectionStart=="number"&&typeof O.selectionEnd=="number"){const V=O.selectionStart,F=O.selectionEnd;let $=V;S=S.substring(0,V)+x+S.substring(F,S.length),$+=x.length,O.selectionStart=O.selectionEnd=$}else S+=x;p.value=S},h=["+","-","*","/","(",")"],w=(x,O)=>{let S="";switch(O){case"name":{S="${"+x+"}";break}case"function":{S=x+"()";break}default:S=x}m(S)},b=[],N=e.ref([]),E=e.ref(!0),u=e.ref([]),B=x=>{var O;for(const S of x)(O=S==null?void 0:S.children)!=null&&O.length?B(S.children):b.push({key:S.key,title:S.title})},_=async()=>{try{const x=await n.get(`${ke}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:O,data:S=[]}=x.data;O&&(S!=null&&S.length)&&(B(S),u.value=S)}catch(x){console.error(x)}},g=x=>{N.value=x,E.value=!1};return e.watch(f,x=>{const O=b.map(S=>S.title.indexOf(x)>-1?Eo(S.key,u.value):null).filter((S,V,F)=>S&&F.indexOf(S)===V);N.value=O,f.value=x,E.value=!0}),e.onMounted(()=>{_()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:u,searchFuncValue:f,expandedKeys:N,autoExpandParent:E,selectedElem:w,onExpand:g}}}),Lf="",Ef="",cs={class:"formula-calculation"},ds={class:"field-area"},ps=["onClick"],fs={class:"cal_right_bottom"},us={class:"cal_fu"},ms=["onClick"],hs={class:"function-wrap"},ys={class:"wrap-search"},gs={class:"tree-box"},bs={key:0},Cs={style:{color:"#f50"}},ws={key:1},xs=["onClick"],ks={class:"cal_a"};function _s(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),f=e.resolveComponent("a-popover"),m=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",cs,[e.createVNode(m,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:b=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,ps))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",fs,[e.createElementVNode("ul",us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:b=>t.selectedElem(h,"symbol"),key:w},e.toDisplayString(h),9,ms))),128))]),e.createVNode(f,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",hs,[e.createElementVNode("div",ys,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",gs,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:w})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",bs,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Cs,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",ws,e.toDisplayString(h),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:b=>t.selectedElem(h,"function")},"插入",8,xs)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",ks,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Ss=te(ss,[["render",_s],["__scopeId","data-v-1e6dd439"]]),As=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Ss,AForm:v.Form,AModal:v.Modal,AFormItem:v.FormItem,AInput:v.Input,ASelect:v.Select,ASelectOption:v.SelectOption,ATextarea:v.Textarea},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(Re),a=e.inject(pe),r=e.inject(Be),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const $=["leftAxisList","rightAxisList","queryColumnList","indicators"];let P=[];for(const y of $)Object.prototype.hasOwnProperty.call(e.unref(a),y)&&(P=P.concat(e.unref(a)[y]));return P}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},f=e.ref(),m=e.ref(!1),h=e.ref();e.watch(m,$=>{if($)if(t.mode==="edit"){const{label:P,calcType:y,formula:C,builtInValueSource:A,builtInFormula:I,builtInCalcWay:D}=t.item;h.value={label:P,calcType:y,formula:C,builtInValueSource:A,builtInFormula:I,builtInCalcWay:D}}else t.mode==="add"&&(h.value=ne.cloneDeep(p));else h.value=ne.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!$)},{immediate:!0,deep:!0});let w=!1;const b=()=>{w=!0},N=$=>{const P=e.unref(l).find(y=>y.id===$);P&&(h.value.builtInCalcWay=P.keyName),w=!0},E=()=>{var y;const $=((y=e.unref(a)[t.type])==null?void 0:y.slice())||[],{label:P}=e.unref(h)||{};if(t.mode==="add"){const C=Lo();$.push({...e.unref(h),id:C,show:!0,name:P})}else t.mode==="edit"&&($[t.index]={...$[t.index],...e.unref(h),name:P});r({[t.type]:$})},u=()=>{m.value=!0},B=()=>{m.value=!1},_=async($,P)=>{if(P==="")return Promise.reject(new Error("请输入指标名"));{const y=e.unref(d).find(C=>C.label===P);return y?y.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},g=e.computed(()=>{let $={label:[{required:!0,validator:_,trigger:"change"}]};return h.value.calcType==="BUILT_IN"&&($={...$,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),$}),x=()=>{f.value.validate().then(()=>{w&&E(),w=!1,B()})},O=()=>{f.value.clearValidate(),B()},S=()=>{w=!0,e.unref(h).builtInCalcWay=""},V=e.computed(()=>{let $="";const P=e.unref(h).builtInCalcWay,y=e.unref(h).builtInValueSource;if(!y||!P)return $;switch(e.unref(h).builtInFormula){case"BUILT_IN_RANK":{P==="ASC"?$="【"+y+"】由小到大在所有值中的排名":$="【"+y+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{$=`所有【】的
60
+ `,P==="ASC"?$=$+"【"+y+"】由小到大的组内的排名":$=$+"【"+y+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let C="";switch(P){case"SUM":{C="求和";break}case"AVG":{C="求平均值";break}case"MIN":{C="求最小值";break}case"MAX":{C="求最大值";break}}$="将所有【"+y+"】"+C;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let C="";switch($=`所有【】的
61
+ `,P){case"SUM":{C="求和";break}case"AVG":{C="求平均值";break}case"MIN":{C="求最小值";break}case"MAX":{C="求最大值";break}}$=$+"将所有【"+y+"】"+C;break}}return $}),F=($,P)=>P.keyName.toLowerCase().indexOf($.toLowerCase())>=0;return o({showModal:u}),{visible:m,onCancel:O,labelCol:s,wrapperCol:c,formState:h,builtInValueSourceList:i,onOK:x,onChange:b,formRules:g,accessLogic:V,formRef:f,onChangeBuiltInFormula:S,componentList:l,onChangeComponent:N,filterOption:F}}}),Bf="",Ns={key:0,class:"accesstip"};function Ts(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),f=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-form"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(m,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=w=>t.formState.label=w),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=w=>t.formState.calcType=w),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=w=>t.formState.formula=w),item:t.item,onChange:t.onChange},null,8,["value","item","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=w=>t.formState.builtInFormula=w),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=w=>t.formState.builtInValueSource=w),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(w,b)=>(e.openBlock(),e.createBlock(s,{key:b,value:w.label,disabled:t.item.label===w.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=w=>t.formState.builtInCalcWay=w),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Ns," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(f,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=w=>t.formState.builtInValueSource=w),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const Ls=te(As,[["render",Ts],["__scopeId","data-v-934b2c09"]]),Es=e.defineComponent({name:"DataConfigCard",directives:{focus:Fn},components:{CalculationModal:Ls,FilterModal:Ki,CustomGroupModal:ri,SettingOutlined:Ll,DeleteOutlined:el,CopyOutlined:Xr,InfoCircleOutlined:fl,CustomSortModal:Wl,PlusOutlined:Sl,ACard:v.Card,ACheckbox:v.Checkbox,AInput:v.Input,ADropdown:v.Dropdown,AMenu:v.Menu,ASubMenu:v.SubMenu,AMenuItem:v.MenuItem,AMenuDivider:v.MenuDivider,ASelect:v.Select,APopover:v.Popover,Draggable:ft,ConfigName:ts,SortByCpnt:is},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(pe),a=e.inject(Be),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(Zt),d=(G={})=>{var Y;const{type:z}=t;if(e.unref(i)==="SQL_VIEW")return!0;let q=!1;if(G.scope==="IDX"?r.includes(z)&&(q=!0):["DIM","BUILT_IN_DIM"].includes(G.scope)&&l.includes(z)&&(q=!0),z==="dimensionList"){const le=((Y=e.unref(n)[z])==null?void 0:Y.slice())||[];(le==null?void 0:le.length)===1&&(q=!1)}return q},s=(G="{}")=>{var z;try{const q=JSON.parse(G);if(!d(q))return;const Y=((z=e.unref(n)[t.type])==null?void 0:z.slice())||[];["classificationList","seriesList"].includes(t.type)&&Y.forEach(le=>{le.show=!1}),p(Y,q),Y.push(q),a({[t.type]:Y}),sessionStorage.setItem("indicator-list-item","")}catch(q){console.error(q)}},c=(G="{}")=>{var z;try{const{cardItem:q,type:Y,index:le}=JSON.parse(G);if(!d(q)||Y===t.type)return;const re=((z=e.unref(n)[t.type])==null?void 0:z.slice())||[];p(re,q),re.push(q);const oe=e.unref(n)[Y].slice()||[];oe.splice(le,1),a({[t.type]:re,[Y]:oe})}catch(q){console.error(q)}};function p(G,z){const q=[];if(G.forEach(Y=>{Y.label.includes(z.label)&&q.push(Y.label.split(z.label)[1])}),q.length>=1){for(let Y=1;Y<=q.length;Y++)if(!q.includes(Y+"")){z.label=z.label+Y;break}}}const f=(G,z)=>{var le,re;const q=(le=G.target)==null?void 0:le.checked,Y=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[];["classificationList","seriesList"].includes(t.type)&&Y.forEach(oe=>{oe.show=!1}),Y[z].show=q,a({[t.type]:Y})},m=G=>{var q;const z=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];z.splice(G,1),a({[t.type]:z})},h=()=>{sessionStorage.setItem("indicator-card-item","")},w=()=>{const G=sessionStorage.getItem("indicator-list-item"),z=sessionStorage.getItem("indicator-card-item");G?s(G):z&&c(z)},b=G=>{var xe,Ze;const{newIndex:z,oldIndex:q,from:Y,to:le}=G,re=Y.id,oe=le.id;if(z>=0&&q>=0){if(re===oe){const ae=((xe=e.unref(n)[t.type])==null?void 0:xe.slice())||[],de=ae.splice(q,1)[0];de&&(ae.splice(z,0,de),a({[t.type]:ae}))}else if(t.type===oe){const ae=((Ze=e.unref(n)[oe])==null?void 0:Ze.slice())||[];if(ae!=null&&ae.length){const de=ae.splice(ae.length-1,1)[0];de&&(ae.splice(z,0,de),a({[t.type]:ae}))}}}},N=(G,z)=>{const q=G.oldIndex,Y=z[q];Y&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:Y,type:t.type,index:q}))},E=e.computed(()=>e.unref(n)[t.type]||[]),u=e.ref([]);let B=!1;e.watch(()=>e.unref(E).length,G=>{u.value=new Array(G).fill(!1)},{flush:"post",immediate:!0});const _=G=>{var q;const z=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];z.splice(G,1),a({[t.type]:z})},g=G=>{u.value[G]=!0},x=()=>{B=!0},O=(G,z,q)=>{var Y,le;if(u.value[z]=!1,B){const re=(Y=G.target)==null?void 0:Y.value,oe=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],xe=oe.filter(ae=>{var de;return(de=ae==null?void 0:ae.formula)==null?void 0:de.includes(q)}).map(ae=>ae.id),Ze=oe.filter(ae=>{var de;return(de=ae==null?void 0:ae.builtInValueSource)==null?void 0:de.includes(q)}).map(ae=>ae.id);if(xe!=null&&xe.length)for(const ae of xe){const de=oe.find(Ho=>Ho.id===ae);de.formula=de.formula.replaceAll(q,re)}if(Ze!=null&&Ze.length)for(const ae of Ze){const de=oe.find(Ho=>Ho.id===ae);de.builtInValueSource=de.builtInValueSource.replaceAll(q,re)}oe[z].label=re,a({[t.type]:oe})}B=!1},S="DEFAULT",V=e.computed(()=>{const G=e.unref(n)[t.type]||[],{leftAxisList:z=[],rightAxisList:q=[],indicators:Y=[]}=e.unref(n)||{};return[{id:S,label:"默认",name:"默认"},...G,...z,...q,...Y]}),F=(G={},z,q="ASC")=>{var xe;const{label:Y,name:le,id:re}=G,oe=((xe=e.unref(n)[t.type])==null?void 0:xe.slice())||[];re===S?delete oe[z].sort:oe[z].sort={label:Y,columnName:le,type:"NORMAL",order:q},a({[t.type]:oe})},$=(G={},z="ASC")=>{const Y={ASC:"升序",DESC:"降序"}[z],{sort:le}=G,{label:re,order:oe}=le||{};return re&&oe===z?`${Y}(${re})`:Y},P=e.ref(),y=e.ref(),C=e.ref(),A=e.ref(),I=(G={},z)=>{var q;P.value=G,y.value=z,(q=e.unref(C))==null||q.showModal()},D=G=>{var z;return"自定义排序"+(((z=G==null?void 0:G.sort)==null?void 0:z.type)==="CUSTOM"?"(已配置)":"")},U=(G={},z)=>{var q;P.value=G,y.value=z,(q=e.unref(A))==null||q.showModal()},k=G=>"自定义分组"+((G==null?void 0:G.customGroup)!=null?"(已配置)":""),T=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],L=(G,z)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[z].aggregate=G,a({[t.type]:q})},M=(G,z)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[z].dateFormat=G,a({[t.type]:q})},j=(G="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[G]})`,W=(G={})=>{var z;return"过滤"+(G!=null&&G.conditions&&((z=G==null?void 0:G.conditions)==null?void 0:z.length)>0?"(已配置)":"")},K=e.ref(),J=e.ref(),ee=e.ref(),ie=(G={},z)=>{P.value=G,y.value=z,e.unref(K).showModal()},fe=(G={},z)=>{P.value=G,y.value=z,e.unref(J).showModal(G)},ue=(G={},z)=>{P.value=G,y.value=z,e.unref(ee).showModal(G)},Ie=e.ref(),Ye=e.ref("add"),Ke=(G,z,q)=>{var Y;Ye.value=G,G==="edit"&&(P.value=z,y.value=q),(Y=e.unref(Ie))==null||Y.showModal()},Xe=e.inject(Le),Qe=e.unref(e.inject(Ee)),ze=e.ref([]),Je=e.computed(()=>e.unref(n)[t.type]||{}),dt=async()=>{try{const G=await Xe.post(`${ke}/diagram/dimFields`,{},{headers:{Authentication:Qe,operateContext:"ygt"}}),{success:z,data:q=[]}=G.data;z&&(ze.value=q)}catch(G){console.error(G)}},pt=(G,z)=>{const q=e.unref(n)[t.type]||{};q[z]=G,a({[t.type]:q})},R=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],H=e.ref({}),X=async(G,z)=>{var Y;const{name:q}=z;if(!R.includes(t.type)&&G&&To(z,"indexCode")){const le=await Xe.post(`${ke}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:z.id,indexCode:z.indexCode,pageId:(Y=window==null?void 0:window.config)==null?void 0:Y.pageId},{headers:{Authentication:Qe,operateContext:"ygt"}}),{success:re,data:oe}=le.data;re&&oe&&(H.value[q]={name:oe.name,code:oe.indexCode})}},Q=G=>{const z=document.createElement("input");document.body.appendChild(z),z.setAttribute("value",G),z.select(),document.execCommand("copy"),document.body.removeChild(z),v.message.success("复制成功")},Z=e.inject(ve),ce=e.computed(()=>t.type==="indicators"&&e.unref(Z).type==="ecanTable"),me=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&dt()}),{onCheckboxChange:f,onDropEnd:m,onDragItemEnd:h,onDragItemAdd:w,onDragItemSort:b,onDragItemStart:N,cardItemList:E,onDelete:_,onEdit:g,onCommitLabelChange:O,sortList:V,onSort:F,handleSortTitle:$,showCustomSortModal:I,customSortModalRef:C,currentItem:P,currentIndex:y,handleCustomSortTitle:D,handleCustomGroupTitle:k,customGroupModalRef:A,showCustomGroupModal:U,editLabelList:u,onLabelChange:x,aggregateList:T,onAggregateChange:L,onDateFormatChange:M,handleAggregateTitle:j,onShowCalculationModal:Ke,handleFilterTitle:W,filterModalRef:K,configNameRef:J,sortByCpntRef:ee,showFilterModal:ie,calculationModalRef:Ie,calculationModalMode:Ye,formatList:o,fieldOptions:ze,fieldData:Je,onFieldChange:pt,onVisibleChange:X,copyDataViewName:Q,dataViewMap:H,isShowConfigName:ce,showConfigNameModal:fe,dimensionType:R,isShowSortByCpnt:me,showSortByCpntModal:ue}}}),Of="",Vf="",ot=t=>(e.pushScopeId("data-v-d8ce3fb3"),t=t(),e.popScopeId(),t),Bs={class:"title"},Os={class:"title-text"},Vs={class:"field-wrap"},Is={class:"field-item"},$s=ot(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Fs={class:"field-item"},Ds=ot(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),vs={class:"title"},Ps={class:"title-text"},Ms=ot(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),js=ot(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Rs={class:"card-item-wrap"},Us={class:"card-item-inner"},Gs=["onClick"],zs=["onClick"],Hs=["onClick"],Ws={style:{display:"flex","align-items":"center"}},qs=["title"],Ys=ot(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Ks={style:{display:"flex","align-items":"center"}},Xs=["title"],Qs=ot(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Js(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),f=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),h=e.resolveComponent("a-menu-item"),w=e.resolveComponent("a-sub-menu"),b=e.resolveComponent("a-menu-divider"),N=e.resolveComponent("copy-outlined"),E=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),B=e.resolveComponent("delete-outlined"),_=e.resolveComponent("a-checkbox"),g=e.resolveComponent("draggable"),x=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),S=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),F=e.resolveComponent("sort-by-cpnt"),$=e.resolveComponent("calculation-modal"),P=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Bs,[e.createElementVNode("div",Os,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Vs,[e.createElementVNode("div",Is,[$s,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=y=>t.onFieldChange(y,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Fs,[Ds,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=y=>t.onFieldChange(y,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",vs,[e.createElementVNode("div",Ps,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Ms]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(y=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),js]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(g,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=y=>t.cardItemList=y),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=y=>t.onDragItemStart(y,t.cardItemList))},{item:e.withCtx(({element:y,index:C})=>[e.createElementVNode("div",Rs,[e.createVNode(_,{class:"card-item",checked:y.show,onChange:A=>t.onCheckboxChange(A,C)},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[!t.editLabelList[C]&&y.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(A=>t.onEdit(C),["prevent","stop"])},e.toDisplayString(y.label),9,Gs)):e.createCommentVNode("",!0),!t.editLabelList[C]&&!y.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(A=>t.onEdit(C),["prevent","stop"])}," 请点击填入名字 ",8,zs)):e.createCommentVNode("",!0),t.editLabelList[C]?e.withDirectives((e.openBlock(),e.createBlock(f,{key:2,"default-value":y.label,size:"small",onBlur:A=>t.onCommitLabelChange(A,C,y.label),onPressEnter:A=>t.onCommitLabelChange(A,C,y.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(y.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(A=>t.onShowCalculationModal("edit",y,C),["prevent","stop"])}," fx ",8,Hs)):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"],onVisibleChange:A=>t.onVisibleChange(A,y)},{overlay:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:t.handleSortTitle(y,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.id,onClick:I=>t.onSort(A,C,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w,{title:t.handleSortTitle(y,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(h,{class:"menu-item",style:{"white-space":"nowrap"},key:A.id,onClick:I=>t.onSort(A,C,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h,{onClick:A=>t.showCustomSortModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(b),e.createVNode(h,{onClick:A=>t.showCustomGroupModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(b),y.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.value,onClick:I=>t.onDateFormatChange(A.value,C)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(y.dateFormat===A.value||!y.dateFormat&&A.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(A.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(b)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(h,{onClick:A=>t.showFilterModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(b),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(y.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.value,onClick:I=>t.onAggregateChange(A.value,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(b)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(h,{onClick:A=>t.showConfigNameModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(b)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(h,{onClick:A=>t.showSortByCpntModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(b)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:0,onClick:A=>t.copyDataViewName(t.dataViewMap[y.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].name},[Ys,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].name),1)],8,qs),e.createVNode(N,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:1,onClick:A=>t.copyDataViewName(t.dataViewMap[y.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Ks,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].code},[Qs,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].code),1)],8,Xs),e.createVNode(N,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(B,{class:"delete-icon",onClick:e.withModifiers(A=>t.onDelete(C),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(x,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(S,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(F,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode($,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const Zs=te(Es,[["render",Js],["__scopeId","data-v-d8ce3fb3"]]),ec={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},tc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Zs},setup(){const t=e.inject(ve),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Be),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var N,E;const s=ne.cloneDeep((N=e.unref(t))==null?void 0:N.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"]},f="ecan";let m=e.unref(o);if(m.startsWith(f)){const u=f.length;m=((E=m.slice(u,u+1))==null?void 0:E.toLowerCase())+m.slice(u+1)}const h=p[m],w=ec,b=(h==null?void 0:h.length)||0;for(let u=0;u<b;u++){const B=h[u];if(!B)break;r.push({...w[B],type:B})}for(const u of c)i(s,u)&&!h.find(B=>B===u)&&(s[u]=[]);l(s)})(),{cardsMap:a,cards:r}}}),If="",$f="",oc={class:"data-group"};function nc(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const ac=te(tc,[["render",nc],["__scopeId","data-v-51c4bf1a"]]),rc=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],lc={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},ic=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:v.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function sc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const cc=te(ic,[["render",sc]]),dc=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const f=t.value;return typeof f=="string"?parseFloat(f):typeof f=="object"&&f!=null?f[t.valueKey]:f}),a=f=>t.value!=null&&typeof t.value=="object"?t.value[t[`${f}ValueKey`]]:Array.isArray(t[f])?t[f][0]&&t[f][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:f=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:f,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):m===""||f==null?o("change",f):o("change",`${f}${m}`)},parser:f=>typeof t.suffix=="string"?f.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?f.replace(t.value[t.suffixValueKey],""):f,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function pc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},f)=>(e.openBlock(),e.createBlock(i,{key:f,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},f)=>(e.openBlock(),e.createBlock(i,{key:f,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const Mn=te(dc,[["render",pc]]),fc=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:v.RadioGroup,ARadioButton:v.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function uc(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const mc=te(fc,[["render",uc]]),hc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function yc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const gc=te(hc,[["render",yc]]),bc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:v.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function Cc(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const wc=te(bc,[["render",Cc]]);var ye="top",Se="bottom",Ae="right",ge="left",Bo="auto",yt=[ye,Se,Ae,ge],nt="start",gt="end",xc="clippingParents",jn="viewport",bt="popper",kc="reference",Rn=yt.reduce(function(t,o){return t.concat([o+"-"+nt,o+"-"+gt])},[]),Un=[].concat(yt,[Bo]).reduce(function(t,o){return t.concat([o,o+"-"+nt,o+"-"+gt])},[]),_c="beforeRead",Sc="read",Ac="afterRead",Nc="beforeMain",Tc="main",Lc="afterMain",Ec="beforeWrite",Bc="write",Oc="afterWrite",Vc=[_c,Sc,Ac,Nc,Tc,Lc,Ec,Bc,Oc];function $e(t){return t?(t.nodeName||"").toLowerCase():null}function we(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function He(t){var o=we(t).Element;return t instanceof o||t instanceof Element}function Ne(t){var o=we(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Oo(t){if(typeof ShadowRoot>"u")return!1;var o=we(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ic(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Ne(l)||!$e(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function $c(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Ne(r)||!$e(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const Fc={name:"applyStyles",enabled:!0,phase:"write",fn:Ic,effect:$c,requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var We=Math.max,Ft=Math.min,at=Math.round;function Vo(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function Gn(){return!/^((?!chrome|android).)*safari/i.test(Vo())}function rt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Ne(t)&&(r=t.offsetWidth>0&&at(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&at(a.height)/t.offsetHeight||1);var i=He(t)?we(t):window,d=i.visualViewport,s=!Gn()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,f=a.width/r,m=a.height/l;return{width:f,height:m,top:p,right:c+f,bottom:p+m,left:c,x:c,y:p}}function Io(t){var o=rt(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(o.width-n)<=1&&(n=o.width),Math.abs(o.height-a)<=1&&(a=o.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function zn(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Oo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Me(t){return we(t).getComputedStyle(t)}function Dc(t){return["table","td","th"].indexOf($e(t))>=0}function Ge(t){return((He(t)?t.ownerDocument:t.document)||window.document).documentElement}function Dt(t){return $e(t)==="html"?t:t.assignedSlot||t.parentNode||(Oo(t)?t.host:null)||Ge(t)}function Hn(t){return!Ne(t)||Me(t).position==="fixed"?null:t.offsetParent}function vc(t){var o=/firefox/i.test(Vo()),n=/Trident/i.test(Vo());if(n&&Ne(t)){var a=Me(t);if(a.position==="fixed")return null}var r=Dt(t);for(Oo(r)&&(r=r.host);Ne(r)&&["html","body"].indexOf($e(r))<0;){var l=Me(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Ct(t){for(var o=we(t),n=Hn(t);n&&Dc(n)&&Me(n).position==="static";)n=Hn(n);return n&&($e(n)==="html"||$e(n)==="body"&&Me(n).position==="static")?o:n||vc(t)||o}function $o(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wt(t,o,n){return We(t,Ft(o,n))}function Pc(t,o,n){var a=wt(t,o,n);return a>n?n:a}function Wn(){return{top:0,right:0,bottom:0,left:0}}function qn(t){return Object.assign({},Wn(),t)}function Yn(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Mc=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,qn(typeof o!="number"?o:Yn(o,yt))};function jc(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=Fe(n.placement),s=$o(d),c=[ge,Ae].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var f=Mc(r.padding,n),m=Io(l),h=s==="y"?ye:ge,w=s==="y"?Se:Ae,b=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],N=i[s]-n.rects.reference[s],E=Ct(l),u=E?s==="y"?E.clientHeight||0:E.clientWidth||0:0,B=b/2-N/2,_=f[h],g=u-m[p]-f[w],x=u/2-m[p]/2+B,O=wt(_,x,g),S=s;n.modifiersData[a]=(o={},o[S]=O,o.centerOffset=O-x,o)}}function Rc(t){var o=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=o.elements.popper.querySelector(r),!r)||zn(o.elements.popper,r)&&(o.elements.arrow=r))}const Uc={name:"arrow",enabled:!0,phase:"main",fn:jc,effect:Rc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lt(t){return t.split("-")[1]}var Gc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zc(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:at(n*r)/r||0,y:at(a*r)/r||0}}function Kn(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,f=t.isFixed,m=i.x,h=m===void 0?0:m,w=i.y,b=w===void 0?0:w,N=typeof p=="function"?p({x:h,y:b}):{x:h,y:b};h=N.x,b=N.y;var E=i.hasOwnProperty("x"),u=i.hasOwnProperty("y"),B=ge,_=ye,g=window;if(c){var x=Ct(n),O="clientHeight",S="clientWidth";if(x===we(n)&&(x=Ge(n),Me(x).position!=="static"&&d==="absolute"&&(O="scrollHeight",S="scrollWidth")),x=x,r===ye||(r===ge||r===Ae)&&l===gt){_=Se;var V=f&&x===g&&g.visualViewport?g.visualViewport.height:x[O];b-=V-a.height,b*=s?1:-1}if(r===ge||(r===ye||r===Se)&&l===gt){B=Ae;var F=f&&x===g&&g.visualViewport?g.visualViewport.width:x[S];h-=F-a.width,h*=s?1:-1}}var $=Object.assign({position:d},c&&Gc),P=p===!0?zc({x:h,y:b},we(n)):{x:h,y:b};if(h=P.x,b=P.y,s){var y;return Object.assign({},$,(y={},y[_]=u?"0":"",y[B]=E?"0":"",y.transform=(g.devicePixelRatio||1)<=1?"translate("+h+"px, "+b+"px)":"translate3d("+h+"px, "+b+"px, 0)",y))}return Object.assign({},$,(o={},o[_]=u?b+"px":"",o[B]=E?h+"px":"",o.transform="",o))}function Hc(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:Fe(o.placement),variation:lt(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:r,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,Kn(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Kn(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Wc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hc,data:{}};var vt={passive:!0};function qc(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=we(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,vt)}),d&&s.addEventListener("resize",n.update,vt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,vt)}),d&&s.removeEventListener("resize",n.update,vt)}}const Yc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qc,data:{}};var Kc={left:"right",right:"left",bottom:"top",top:"bottom"};function Pt(t){return t.replace(/left|right|bottom|top/g,function(o){return Kc[o]})}var Xc={start:"end",end:"start"};function Xn(t){return t.replace(/start|end/g,function(o){return Xc[o]})}function Fo(t){var o=we(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Do(t){return rt(Ge(t)).left+Fo(t).scrollLeft}function Qc(t,o){var n=we(t),a=Ge(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Gn();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Do(t),y:s}}function Jc(t){var o,n=Ge(t),a=Fo(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=We(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=We(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Do(t),s=-a.scrollTop;return Me(r||n).direction==="rtl"&&(d+=We(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function vo(t){var o=Me(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Qn(t){return["html","body","#document"].indexOf($e(t))>=0?t.ownerDocument.body:Ne(t)&&vo(t)?t:Qn(Dt(t))}function xt(t,o){var n;o===void 0&&(o=[]);var a=Qn(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=we(a),i=r?[l].concat(l.visualViewport||[],vo(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(xt(Dt(i)))}function Po(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Zc(t,o){var n=rt(t,!1,o==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Jn(t,o,n){return o===jn?Po(Qc(t,n)):He(o)?Zc(o,n):Po(Jc(Ge(t)))}function ed(t){var o=xt(Dt(t)),n=["absolute","fixed"].indexOf(Me(t).position)>=0,a=n&&Ne(t)?Ct(t):t;return He(a)?o.filter(function(r){return He(r)&&zn(r,a)&&$e(r)!=="body"}):[]}function td(t,o,n,a){var r=o==="clippingParents"?ed(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=Jn(t,c,a);return s.top=We(p.top,s.top),s.right=Ft(p.right,s.right),s.bottom=Ft(p.bottom,s.bottom),s.left=We(p.left,s.left),s},Jn(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Zn(t){var o=t.reference,n=t.element,a=t.placement,r=a?Fe(a):null,l=a?lt(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case ye:s={x:i,y:o.y-n.height};break;case Se:s={x:i,y:o.y+o.height};break;case Ae:s={x:o.x+o.width,y:d};break;case ge:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?$o(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case nt:s[c]=s[c]-(o[p]/2-n[p]/2);break;case gt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function kt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?xc:d,c=n.rootBoundary,p=c===void 0?jn:c,f=n.elementContext,m=f===void 0?bt:f,h=n.altBoundary,w=h===void 0?!1:h,b=n.padding,N=b===void 0?0:b,E=qn(typeof N!="number"?N:Yn(N,yt)),u=m===bt?kc:bt,B=t.rects.popper,_=t.elements[w?u:m],g=td(He(_)?_:_.contextElement||Ge(t.elements.popper),s,p,i),x=rt(t.elements.reference),O=Zn({reference:x,element:B,strategy:"absolute",placement:r}),S=Po(Object.assign({},B,O)),V=m===bt?S:x,F={top:g.top-V.top+E.top,bottom:V.bottom-g.bottom+E.bottom,left:g.left-V.left+E.left,right:V.right-g.right+E.right},$=t.modifiersData.offset;if(m===bt&&$){var P=$[r];Object.keys(F).forEach(function(y){var C=[Ae,Se].indexOf(y)>=0?1:-1,A=[ye,Se].indexOf(y)>=0?"y":"x";F[y]+=P[A]*C})}return F}function od(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?Un:s,p=lt(a),f=p?d?Rn:Rn.filter(function(w){return lt(w)===p}):yt,m=f.filter(function(w){return c.indexOf(w)>=0});m.length===0&&(m=f);var h=m.reduce(function(w,b){return w[b]=kt(t,{placement:b,boundary:r,rootBoundary:l,padding:i})[Fe(b)],w},{});return Object.keys(h).sort(function(w,b){return h[w]-h[b]})}function nd(t){if(Fe(t)===Bo)return[];var o=Pt(t);return[Xn(t),o,Xn(o)]}function ad(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,f=n.rootBoundary,m=n.altBoundary,h=n.flipVariations,w=h===void 0?!0:h,b=n.allowedAutoPlacements,N=o.options.placement,E=Fe(N),u=E===N,B=s||(u||!w?[Pt(N)]:nd(N)),_=[N].concat(B).reduce(function(W,K){return W.concat(Fe(K)===Bo?od(o,{placement:K,boundary:p,rootBoundary:f,padding:c,flipVariations:w,allowedAutoPlacements:b}):K)},[]),g=o.rects.reference,x=o.rects.popper,O=new Map,S=!0,V=_[0],F=0;F<_.length;F++){var $=_[F],P=Fe($),y=lt($)===nt,C=[ye,Se].indexOf(P)>=0,A=C?"width":"height",I=kt(o,{placement:$,boundary:p,rootBoundary:f,altBoundary:m,padding:c}),D=C?y?Ae:ge:y?Se:ye;g[A]>x[A]&&(D=Pt(D));var U=Pt(D),k=[];if(l&&k.push(I[P]<=0),d&&k.push(I[D]<=0,I[U]<=0),k.every(function(W){return W})){V=$,S=!1;break}O.set($,k)}if(S)for(var T=w?3:1,L=function(K){var J=_.find(function(ee){var ie=O.get(ee);if(ie)return ie.slice(0,K).every(function(fe){return fe})});if(J)return V=J,"break"},M=T;M>0;M--){var j=L(M);if(j==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const rd={name:"flip",enabled:!0,phase:"main",fn:ad,requiresIfExists:["offset"],data:{_skip:!1}};function ea(t,o,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-o.height-n.y,right:t.right-o.width+n.x,bottom:t.bottom-o.height+n.y,left:t.left-o.width-n.x}}function ta(t){return[ye,Ae,Se,ge].some(function(o){return t[o]>=0})}function ld(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=kt(o,{elementContext:"reference"}),d=kt(o,{altBoundary:!0}),s=ea(i,a),c=ea(d,r,l),p=ta(s),f=ta(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:f},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const id={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ld};function sd(t,o,n){var a=Fe(t),r=[ge,ye].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[ge,Ae].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function cd(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=Un.reduce(function(p,f){return p[f]=sd(f,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const dd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cd};function pd(t){var o=t.state,n=t.name;o.modifiersData[n]=Zn({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const fd={name:"popperOffsets",enabled:!0,phase:"read",fn:pd,data:{}};function ud(t){return t==="x"?"y":"x"}function md(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,f=n.padding,m=n.tether,h=m===void 0?!0:m,w=n.tetherOffset,b=w===void 0?0:w,N=kt(o,{boundary:s,rootBoundary:c,padding:f,altBoundary:p}),E=Fe(o.placement),u=lt(o.placement),B=!u,_=$o(E),g=ud(_),x=o.modifiersData.popperOffsets,O=o.rects.reference,S=o.rects.popper,V=typeof b=="function"?b(Object.assign({},o.rects,{placement:o.placement})):b,F=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),$=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,P={x:0,y:0};if(x){if(l){var y,C=_==="y"?ye:ge,A=_==="y"?Se:Ae,I=_==="y"?"height":"width",D=x[_],U=D+N[C],k=D-N[A],T=h?-S[I]/2:0,L=u===nt?O[I]:S[I],M=u===nt?-S[I]:-O[I],j=o.elements.arrow,W=h&&j?Io(j):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Wn(),J=K[C],ee=K[A],ie=wt(0,O[I],W[I]),fe=B?O[I]/2-T-ie-J-F.mainAxis:L-ie-J-F.mainAxis,ue=B?-O[I]/2+T+ie+ee+F.mainAxis:M+ie+ee+F.mainAxis,Ie=o.elements.arrow&&Ct(o.elements.arrow),Ye=Ie?_==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,Ke=(y=$==null?void 0:$[_])!=null?y:0,Xe=D+fe-Ke-Ye,Qe=D+ue-Ke,ze=wt(h?Ft(U,Xe):U,D,h?We(k,Qe):k);x[_]=ze,P[_]=ze-D}if(d){var Je,dt=_==="x"?ye:ge,pt=_==="x"?Se:Ae,R=x[g],H=g==="y"?"height":"width",X=R+N[dt],Q=R-N[pt],Z=[ye,ge].indexOf(E)!==-1,ce=(Je=$==null?void 0:$[g])!=null?Je:0,me=Z?X:R-O[H]-S[H]-ce+F.altAxis,G=Z?R+O[H]+S[H]-ce-F.altAxis:Q,z=h&&Z?Pc(me,R,G):wt(h?me:X,R,h?G:Q);x[g]=z,P[g]=z-R}o.modifiersData[a]=P}}const hd={name:"preventOverflow",enabled:!0,phase:"main",fn:md,requiresIfExists:["offset"]};function yd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function gd(t){return t===we(t)||!Ne(t)?Fo(t):yd(t)}function bd(t){var o=t.getBoundingClientRect(),n=at(o.width)/t.offsetWidth||1,a=at(o.height)/t.offsetHeight||1;return n!==1||a!==1}function Cd(t,o,n){n===void 0&&(n=!1);var a=Ne(o),r=Ne(o)&&bd(o),l=Ge(o),i=rt(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&(($e(o)!=="body"||vo(l))&&(d=gd(o)),Ne(o)?(s=rt(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=Do(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function wd(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function xd(t){var o=wd(t);return Vc.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function kd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function _d(t){var o=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(o).map(function(n){return o[n]})}var oa={placement:"bottom",modifiers:[],strategy:"absolute"};function na(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return!o.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Sd(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?oa:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},oa,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},f=[],m=!1,h={state:p,setOptions:function(E){var u=typeof E=="function"?E(p.options):E;b(),p.options=Object.assign({},l,p.options,u),p.scrollParents={reference:He(d)?xt(d):d.contextElement?xt(d.contextElement):[],popper:xt(s)};var B=xd(_d([].concat(a,p.options.modifiers)));return p.orderedModifiers=B.filter(function(_){return _.enabled}),w(),h.update()},forceUpdate:function(){if(!m){var E=p.elements,u=E.reference,B=E.popper;if(na(u,B)){p.rects={reference:Cd(u,Ct(B),p.options.strategy==="fixed"),popper:Io(B)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(F){return p.modifiersData[F.name]=Object.assign({},F.data)});for(var _=0;_<p.orderedModifiers.length;_++){if(p.reset===!0){p.reset=!1,_=-1;continue}var g=p.orderedModifiers[_],x=g.fn,O=g.options,S=O===void 0?{}:O,V=g.name;typeof x=="function"&&(p=x({state:p,options:S,name:V,instance:h})||p)}}}},update:kd(function(){return new Promise(function(N){h.forceUpdate(),N(p)})}),destroy:function(){b(),m=!0}};if(!na(d,s))return h;h.setOptions(c).then(function(N){!m&&c.onFirstUpdate&&c.onFirstUpdate(N)});function w(){p.orderedModifiers.forEach(function(N){var E=N.name,u=N.options,B=u===void 0?{}:u,_=N.effect;if(typeof _=="function"){var g=_({state:p,name:E,instance:h,options:B}),x=function(){};f.push(g||x)}})}function b(){f.forEach(function(N){return N()}),f=[]}return h}}var Ad=[Yc,fd,Wc,Fc,dd,rd,hd,Uc,id],Nd=Sd({defaultModifiers:Ad});function Mo(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function aa(t,o){if(t){if(typeof t=="string")return Mo(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mo(t,o):void 0}}function Td(t){return function(o){if(Array.isArray(o))return Mo(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||aa(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function it(t){return it=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},it(t)}function ra(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function la(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){ra(l,a,r,i,d,"next",s)}function d(s){ra(l,a,r,i,d,"throw",s)}i(void 0)})}}var ia={exports:{}},sa={exports:{}};(function(t){function o(n){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(sa),function(t){var o=sa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(k,T,L){k[T]=L.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function m(k,T,L){return Object.defineProperty(k,T,{value:L,enumerable:!0,configurable:!0,writable:!0}),k[T]}try{m({},"")}catch{m=function(T,L,M){return T[L]=M}}function h(k,T,L,M){var j=T&&T.prototype instanceof _?T:_,W=Object.create(j.prototype),K=new D(M||[]);return d(W,"_invoke",{value:y(k,L,K)}),W}function w(k,T,L){try{return{type:"normal",arg:k.call(T,L)}}catch(M){return{type:"throw",arg:M}}}r.wrap=h;var b="suspendedStart",N="suspendedYield",E="executing",u="completed",B={};function _(){}function g(){}function x(){}var O={};m(O,c,function(){return this});var S=Object.getPrototypeOf,V=S&&S(S(U([])));V&&V!==l&&i.call(V,c)&&(O=V);var F=x.prototype=_.prototype=Object.create(O);function $(k){["next","throw","return"].forEach(function(T){m(k,T,function(L){return this._invoke(T,L)})})}function P(k,T){function L(j,W,K,J){var ee=w(k[j],k,W);if(ee.type!=="throw"){var ie=ee.arg,fe=ie.value;return fe&&o(fe)=="object"&&i.call(fe,"__await")?T.resolve(fe.__await).then(function(ue){L("next",ue,K,J)},function(ue){L("throw",ue,K,J)}):T.resolve(fe).then(function(ue){ie.value=ue,K(ie)},function(ue){return L("throw",ue,K,J)})}J(ee.arg)}var M;d(this,"_invoke",{value:function(j,W){function K(){return new T(function(J,ee){L(j,W,J,ee)})}return M=M?M.then(K,K):K()}})}function y(k,T,L){var M=b;return function(j,W){if(M===E)throw new Error("Generator is already running");if(M===u){if(j==="throw")throw W;return{value:a,done:!0}}for(L.method=j,L.arg=W;;){var K=L.delegate;if(K){var J=C(K,L);if(J){if(J===B)continue;return J}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(M===b)throw M=u,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);M=E;var ee=w(k,T,L);if(ee.type==="normal"){if(M=L.done?u:N,ee.arg===B)continue;return{value:ee.arg,done:L.done}}ee.type==="throw"&&(M=u,L.method="throw",L.arg=ee.arg)}}}function C(k,T){var L=T.method,M=k.iterator[L];if(M===a)return T.delegate=null,L==="throw"&&k.iterator.return&&(T.method="return",T.arg=a,C(k,T),T.method==="throw")||L!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+L+"' method")),B;var j=w(M,k.iterator,T.arg);if(j.type==="throw")return T.method="throw",T.arg=j.arg,T.delegate=null,B;var W=j.arg;return W?W.done?(T[k.resultName]=W.value,T.next=k.nextLoc,T.method!=="return"&&(T.method="next",T.arg=a),T.delegate=null,B):W:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,B)}function A(k){var T={tryLoc:k[0]};1 in k&&(T.catchLoc=k[1]),2 in k&&(T.finallyLoc=k[2],T.afterLoc=k[3]),this.tryEntries.push(T)}function I(k){var T=k.completion||{};T.type="normal",delete T.arg,k.completion=T}function D(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(A,this),this.reset(!0)}function U(k){if(k||k===""){var T=k[c];if(T)return T.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var L=-1,M=function j(){for(;++L<k.length;)if(i.call(k,L))return j.value=k[L],j.done=!1,j;return j.value=a,j.done=!0,j};return M.next=M}}throw new TypeError(o(k)+" is not iterable")}return g.prototype=x,d(F,"constructor",{value:x,configurable:!0}),d(x,"constructor",{value:g,configurable:!0}),g.displayName=m(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(k){var T=typeof k=="function"&&k.constructor;return!!T&&(T===g||(T.displayName||T.name)==="GeneratorFunction")},r.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,x):(k.__proto__=x,m(k,f,"GeneratorFunction")),k.prototype=Object.create(F),k},r.awrap=function(k){return{__await:k}},$(P.prototype),m(P.prototype,p,function(){return this}),r.AsyncIterator=P,r.async=function(k,T,L,M,j){j===void 0&&(j=Promise);var W=new P(h(k,T,L,M),j);return r.isGeneratorFunction(T)?W:W.next().then(function(K){return K.done?K.value:W.next()})},$(F),m(F,f,"Generator"),m(F,c,function(){return this}),m(F,"toString",function(){return"[object Generator]"}),r.keys=function(k){var T=Object(k),L=[];for(var M in T)L.push(M);return L.reverse(),function j(){for(;L.length;){var W=L.pop();if(W in T)return j.value=W,j.done=!1,j}return j.done=!0,j}},r.values=U,D.prototype={constructor:D,reset:function(k){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(I),!k)for(var T in this)T.charAt(0)==="t"&&i.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=a)},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 T=this;function L(ee,ie){return W.type="throw",W.arg=k,T.next=ee,ie&&(T.method="next",T.arg=a),!!ie}for(var M=this.tryEntries.length-1;M>=0;--M){var j=this.tryEntries[M],W=j.completion;if(j.tryLoc==="root")return L("end");if(j.tryLoc<=this.prev){var K=i.call(j,"catchLoc"),J=i.call(j,"finallyLoc");if(K&&J){if(this.prev<j.catchLoc)return L(j.catchLoc,!0);if(this.prev<j.finallyLoc)return L(j.finallyLoc)}else if(K){if(this.prev<j.catchLoc)return L(j.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return L(j.finallyLoc)}}}},abrupt:function(k,T){for(var L=this.tryEntries.length-1;L>=0;--L){var M=this.tryEntries[L];if(M.tryLoc<=this.prev&&i.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var j=M;break}}j&&(k==="break"||k==="continue")&&j.tryLoc<=T&&T<=j.finallyLoc&&(j=null);var W=j?j.completion:{};return W.type=k,W.arg=T,j?(this.method="next",this.next=j.finallyLoc,B):this.complete(W)},complete:function(k,T){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"&&T&&(this.next=T),B},finish:function(k){for(var T=this.tryEntries.length-1;T>=0;--T){var L=this.tryEntries[T];if(L.finallyLoc===k)return this.complete(L.completion,L.afterLoc),I(L),B}},catch:function(k){for(var T=this.tryEntries.length-1;T>=0;--T){var L=this.tryEntries[T];if(L.tryLoc===k){var M=L.completion;if(M.type==="throw"){var j=M.arg;I(L)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(k,T,L){return this.delegate={iterator:U(k),resultName:T,nextLoc:L},this.method==="next"&&(this.arg=a),B}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(ia);var Mt=ia.exports(),jt=Mt;try{regeneratorRuntime=Mt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Mt:Function("r","regeneratorRuntime = r")(Mt)}function Ld(t){var o=function(n,a){if(it(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(it(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return it(o)==="symbol"?o:String(o)}function jo(t,o,n){return(o=Ld(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Rt=e.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(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,f=c.clientY,m=p-i,h=f-d;m<0&&(m=0),h<0&&(h=0),m>t.size&&(m=t.size),h>t.size&&(h=t.size);var w=m/t.size*100,b=100-h/t.size*100;n("change",w,b)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ca=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Ed=ca(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Bd=ca(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function je(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}je(".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}"),Rt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[Ed,Bd,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Rt.__scopeId="data-v-24517fec",Rt.__file="src/picker/Saturation.vue";var Ut=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),Od={ref:"canvas"};je(".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}"),Ut.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Od,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Ut.__scopeId="data-v-78b9f4f0",Ut.__file="src/picker/Hue.vue";var Gt=e.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(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,f.fillStyle="#ffffff",f.fillRect(0,0,m,m),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var f=parseFloat((p/t.height).toFixed(2));n("change",f)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Vd={ref:"canvas"};je(".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}"),Gt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Vd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Gt.__scopeId="data-v-24dc9656",Gt.__file="src/picker/Alpha.vue";var zt=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,o){var n=o.emit;return{onInput:function(a){var r;n("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){n("focus")},onBlur:function(){n("blur")},onEnter:function(){n("enter")}}}}),Id={class:"input"},$d={class:"label"},Fd=[".value"];function _t(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,f=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(m){f=!0,i=m}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}}(t,o)||aa(t,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
63
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function da(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Te(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?da(Object(n),!0).forEach(function(a){jo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{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-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),zt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Id,[e.createElementVNode("span",$d,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:o[0]||(o[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:o[1]||(o[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:o[2]||(o[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:o[3]||(o[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,Fd)])},zt.__scopeId="data-v-d52a4d02",zt.__file="src/picker/InputValue.vue";var pa=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},fa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Ht=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(fa[o]||o).concat(fa[n]||n)},ua=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Ht(o)).concat(Ht(n)).concat(Ht(a))},st=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},St=function(t,o,n){t=6*st(t,360),o=st(o,100),n=st(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*f)}},ma=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=pa(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=St(a,r,l),c=s.r,p=s.g,f=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(f,", ").concat(i,")");default:return"".concat(ua(St(a,r,l))).concat(Ht(255*i))}else switch(o){case"hsl":var m=pa(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*m[1]),"%, ").concat(Math.round(100*m[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=St(a,r,l),w=h.r,b=h.g,N=h.b;return"rgb(".concat(w,", ").concat(b,", ").concat(N,")");default:return ua(St(a,r,l))}},Wt=function(t){var o=t.r,n=t.g,a=t.b;o=st(o,255),n=st(n,255),a=st(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ha=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},ya=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ro=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Uo(t,Go(t),n),r=wa(a);return ma(r,o,n)}return""},ga=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},ba=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},Ca=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Uo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=ga(t),a=n.r,r=n.g,l=n.b,i=n.a;return Te(Te({},Wt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=Ca(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=ba(t),c=s.h,p=s.s,f=s.l,m=s.a;return Te(Te({},ha({h:c,s:p,l:f})),{},{a:+m});default:var h=ya(t),w=h.r,b=h.g,N=h.b,E=h.a;return Te(Te({},Wt({r:w,g:b,b:N})),{},{a:E/255})}else switch(o){case"rgb":return Te(Te({},Wt(ga(t))),{},{a:1});case"hsv":var u=Ca(t);return{h:u.h,s:u.s,v:u.v,a:1};case"hsl":return Te(Te({},ha(ba(t))),{},{a:1});default:return Te(Te({},Wt(ya(t))),{},{a:1})}},Go=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},wa=function(t){var o=t.h,n=t.s,a=t.v,r=t.a;return isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:o,s:n,v:a,a:r}},At=e.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(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,f.fillStyle="#ffffff",f.fillRect(0,0,m,m),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),Dd=["draggable"];je(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),At.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Dd)},At.__scopeId="data-v-02da71fd",At.__file="src/color-item/ColorItem.vue";var qt=e.defineComponent({name:"Colors",components:{ColorItem:At},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,o){var n=o.emit;return{onSelectColor:function(a,r){n("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return Ro(a,"hex",!0)})})}}}),vd={class:"colors"};function xa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?xa(Object(n),!0).forEach(function(a){jo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),qt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",vd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},qt.__scopeId="data-v-0f8b52a8",qt.__file="src/picker/Colors.vue";var Yt=e.defineComponent({name:"Picker",components:{Colors:qt,Saturation:Rt,Hue:Ut,Alpha:Gt,InputValue:zt},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{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return De(De({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var u,B=(u=t.value)===null||u===void 0?void 0:u.trim();if(B!=null&&B!==""){var _=Go(B);return wa(Uo(B,_,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(u,B){var _="";u!=null?(_=ma(De({},u),t.format,t.showAlpha),i.value=De({},u)):i.value=null,d.value=_;var g=s();JSON.stringify(u)!==JSON.stringify(g)&&JSON.stringify(u)!==JSON.stringify(B)&&n("change",_)},{immediate:!0});var c=e.computed(function(){var u;return((u=e.unref(l))===null||u===void 0?void 0:u.h)||0}),p=e.computed(function(){var u;return((u=e.unref(l))===null||u===void 0?void 0:u.s)||0}),f=e.computed(function(){var u;return((u=e.unref(l))===null||u===void 0?void 0:u.v)||0}),m=e.computed(function(){var u,B;return((u=e.unref(l))===null||u===void 0?void 0:u.a)!=null?(B=e.unref(l))===null||B===void 0?void 0:B.a:1}),h=e.computed(function(){return St(e.unref(c),e.unref(p),e.unref(f))}),w=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),b=e.computed(function(){var u=t.format;if(t.showAlpha)switch(u){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(u){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),N=e.ref(-1),E=function(u,B,_){if(u.length!==0){var g=Uo(u,B,_),x=g.h,O=g.s,S=g.v;if(!(isNaN(x)||isNaN(O)||isNaN(S))){var V=1,F=g.a;isNaN(F)||(V=F),l.value={h:x,s:O,v:S,a:V}}}};return{h:c,s:p,v:f,a:m,rgbStr:w,onSelectSaturation:function(u,B){N.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:u,v:B,a:e.unref(m)}:l.value=De(De({},e.unref(l)),{},{s:u,v:B})},onSelectHue:function(u){N.value=-1,e.unref(l)==null&&(l.value={h:u,s:e.unref(p),v:e.unref(f),a:e.unref(m)}),l.value=De(De({},e.unref(l)),{},{h:u})},onSelectAlpha:function(u){N.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(f),a:u}:l.value=De(De({},e.unref(l)),{},{a:u})},label:b,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(u){N.value=-1,d.value=u},handleChange:function(){var u,B=(u=e.unref(d))===null||u===void 0?void 0:u.trim();if(B!==""){var _=t.showAlpha,g=t.format,x=function(O,S,V){if(V)switch(S){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(S){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(B,g,_);x?E(B,g,_):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:N,onSelectColor:function(u,B){if(N.value=B,(u=u.trim())==="")l.value=null;else{var _=Go(u);_?E(u,_,!0):l.value=null}}}}}),Pd={class:"picker-inner"},Md={class:"picker-header"};je(".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}"),Yt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Pd,[e.createElementVNode("div",Md,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Yt.__scopeId="data-v-6ceadec6",Yt.__file="src/picker/Picker.vue";var Kt=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var o=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}})}}}),jd=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function ka(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function zo(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?ka(Object(n),!0).forEach(function(a){jo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ka(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".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}"),Kt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(jd),4)},Kt.__scopeId="data-v-ceb1719c",Kt.__file="src/add-color-item/AddColorItem.vue";var qe=null,ct=e.defineComponent({name:"ColorPicker",components:{ColorItem:At,Picker:Yt,AddColorItem:Kt},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,default:"hex"},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]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,o){var n=o.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(C){return Ro(C,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var C=t.value||"",A=Array.isArray(C)?C:[C];a.value=A.map(function(I){return Ro(I,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,f,m,h,w,b=e.ref(null),N=e.ref(null),E=(s=b,c=N,p={zIndex:t.zIndex},f=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){qe.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(C){var A=C.state,I=A.styles,D=A.placement,U=I.popper;f.value=zo(zo(zo({},U),p),{},{transformOrigin:D==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(C,A){var I,D=_t(C,2),U=D[0],k=D[1],T=_t(A,2),L=T[0],M=T[1];if(U&&k&&(L!==U||M!==L)){(I=qe)===null||I===void 0||I.destroy();var j=U.$el||U,W=k.$el||k;e.nextTick(function(){qe=Nd(j,W,m)})}}),e.onBeforeUnmount(function(){var C;qe&&((C=qe)===null||C===void 0||C.destroy(),qe=null)}),{instance:qe,style:f}),u=E.style,B=function(){e.unref(b)==null&&(b.value=e.unref(y)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},_=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},g=e.ref(),x=function(){var C=la(jt.mark(function A(I){var D,U,k,T;return jt.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(U=I.target,(k=(D=U.dataset)===null||D===void 0?void 0:D.index)!=null&&k!==""){L.next=4;break}return L.abrupt("return");case 4:if(T=+k,e.unref(l)!==T){L.next=7;break}return L.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==T?(_(),h&&clearTimeout(h),h=setTimeout(function(){B(),clearTimeout(h)},100)):B(),l.value=T,b.value=U;case 10:case"end":return L.stop()}},A)}));return function(A){return C.apply(this,arguments)}}(),O=function(){var C=la(jt.mark(function A(I){var D,U,k,T,L;return jt.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(T=I.target,!(!((D=e.unref(g))!==null&&D!==void 0&&D.isEqualNode(T))&&(!((U=e.unref(g))===null||U===void 0)&&U.contains(T)))){M.next=4;break}return M.abrupt("return");case 4:if(L=(k=e.unref(N))===null||k===void 0?void 0:k.$el,!(L!=null&&L.contains(T))){M.next=8;break}return M.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&_()},0);case 10:case"end":return M.stop()}},A)}));return function(A){return C.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(B(),clearTimeout(w))});var S,V=e.ref(t.max>e.unref(a).length),F=e.computed(function(){return typeof t.popupContainer=="string"||it(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),$=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),P=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(N)]},function(){e.nextTick(function(){var C,A;(C=e.unref(g))===null||C===void 0||C.setAttribute("pick-colors-theme",e.unref(P)),(A=e.unref(N))===null||A===void 0||(A=A.$el)===null||A===void 0||A.setAttribute("pick-colors-theme",e.unref(P))})},{immediate:!0}),e.provide("theme",{theme:P});var y=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&B()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),h&&(clearTimeout(h),h=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(C){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===C},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:V,onPickerChange:function(C){var A=e.unref(l),I=e.unref(a).slice(),D=e.unref(a).length;if(A!=null){A>=0?I[A]=C:(l.value=D,I.push(C));var U="";U=Array.isArray(t.value)||t.addColor?I:C,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,C,A)),t.addColor&&D>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:g,onColorClick:x,pickerRef:N,onColorItemDragStart:function(C){C.dataTransfer.effectAllowed="move";var A=C.target;S=+A.dataset.index},onColorItemDragOver:function(C){},onColorItemDrop:function(C){var A=+C.target.dataset.index,I=Td(e.unref(a)),D=I[S];I.splice(S,1);var U=I.slice(0,A),k=I.splice(A),T=U.concat([D]).concat(k);n("update:value",T),n("change",T,T[S],S)},colorItemsRef:y,pickerStyle:u,values:r,teleportDisabled:$,toPopupContainer:F}}});je(".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)}"),ct.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(f){return t.colorItemsRef[p]=f},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},ct.__scopeId="data-v-3c43ade8",ct.__file="src/ColorPicker.vue";const Rd=e.defineComponent({name:"ColorPick",components:{PickColors:ct,AInput:v.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),Ff="",Ud={class:"color-pick"};function Gd(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Ud,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const zd=te(Rd,[["render",Gd],["__scopeId","data-v-e2113f43"]]),Hd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:ct},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{v.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Df="",Wd={class:"color-group-pick"};function qd(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Wd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Yd=te(Hd,[["render",qd],["__scopeId","data-v-b2be8322"]]),Kd=e.defineComponent({name:"FormGroup",components:{Draggable:ft,AppstoreAddOutlined:kn,MinusCircleOutlined:yl,PickColors:ct,InputNumber:Mn,PlusCircleOutlined:wl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var f;const c=(f=t.value)==null?void 0:f.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const m=c[0];if(Object.prototype.toString.call(m)==="[object Object]"){const h=Object.keys(m),w={};h.forEach(b=>{w[b]=""}),c.push(w)}else typeof m=="string"&&c.push(m);n.value=c}else v.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,f)=>{var h;const m=(h=t.value)==null?void 0:h.slice();if(Array.isArray(m)){const w=c==null?void 0:c.target,b=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;f?m[p][f]=b:m[p]=b,n.value=m}},onDelete:c=>{var f;const p=(f=t.value)==null?void 0:f.slice();if(Array.isArray(p)){if(p.length===1){v.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),vf="",Xd={class:"form-group"},Qd={class:"form-row"},Jd={key:0,class:"label"},Zd={key:1,class:"label"},ep={class:"icon-group"};function tp(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Xd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(f.label)?(e.openBlock(),e.createElementBlock("span",Jd,e.toDisplayString(f.useLabelIndex?f.label[p]+(p+1):f.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Zd,e.toDisplayString(f.useLabelIndex?f.label+(p+1):f.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(f.type)),e.mergeProps({class:"value",[t.formatTypeValue(f.typeValue)||""]:typeof c=="string"?c:c[f.value]??f.defaultValue,style:{width:!["color","switch"].includes(f.type)&&t.format.length>1?"110px":""}},f.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,f.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:f=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const op=te(Kd,[["render",tp],["__scopeId","data-v-f0c0ab4d"]]),np=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:v.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function ap(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const rp=te(np,[["render",ap]]),lp=e.defineComponent({name:"PropsToForm",components:{Input:cc,InputNumber:Mn,RadioGroup:mc,Select:gc,Switch:wc,ColorPick:zd,ColorGroupPick:Yd,FormGroup:op,Textarea:rp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Tt),n=e.inject(Qt),a=e.inject(Jt),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:f,value:m}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:w="change",events:b}=p;c[f]={...p,valueProp:h,value:m,events:{[w]:(N,E=!0)=>{l(E?{[f]:N}:{})},...b}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:ne.reduce(s,(c,p,f)=>{const m=lc[f];if(Array.isArray(m)){const h=m.find(w=>{const{onlyType:b,excludeType:N}=w;return b==null&&N==null?!0:b?Ve(e.unref(r),b):N?!Ve(e.unref(r),N):!1});h&&i({result:c,value:p,key:f,mapAttributeProp:h})}else i({result:c,value:p,key:f,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:Ve}}}),Pf="",ip={class:"props-to-form"},sp={class:"label"},cp={class:"component-wrapper"};function dp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",sp,e.toDisplayString(i.label),1),e.createElementVNode("div",cp,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const pp=te(lp,[["render",dp],["__scopeId","data-v-c6fb2484"]]);function fp(){return new Worker("/assets/editor.worker-02df2e61.js")}function up(){return new Worker("/assets/json.worker-867823a6.js")}function mp(){return new Worker("/assets/ts.worker-7254b425.js")}const hp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new up:i==="typescript"||i==="javascript"?new mp:new fp}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=Ba.editor.create(n.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(ne.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),Mf="",yp={class:"editor",ref:"dom"};function gp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",yp,null,512)}const _a=te(hp,[["render",gp],["__scopeId","data-v-71e88372"]]),bp=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],Cp=e.defineComponent({name:"TableColumnConfig",components:{ATable:v.Table,AModal:v.Modal,ACheckbox:v.Checkbox,AInput:v.Input,AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption,Editor:_a},setup(){const t=e.inject(ve),o=e.computed(()=>{var b;return!!((b=e.unref(t))!=null&&b.isGroupTable)}),n=e.computed(()=>{var b;return((b=e.unref(t))==null?void 0:b.graphicConfig)||{}}),a=e.computed(()=>{var b;return((b=e.unref(t))==null?void 0:b.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var N,E,u;let b=[];if(r.value=[],!o.value)b=((N=e.unref(n))==null?void 0:N.queryColumnList)||[];else{const B=((E=e.unref(n))==null?void 0:E.rowHeaderList)||[],_=((u=e.unref(n))==null?void 0:u.indicators)||[];b=[...B,..._]}b.forEach(B=>{var g;let _=(g=e.unref(a))==null?void 0:g.find(x=>x.prop===B.name);_||(_={label:B.label,prop:B.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(_)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:bp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(b,N,E)=>{b&&N&&(l=b,i=N,d.value=b[N]||"",c.value=!0,s.value=E)},onEditorChange:b=>{try{d.value=b}catch(N){console.error(N)}},changeRenderBool:(b,N)=>{b.style=N.target.checked,b.style?b.renderBool===void 0&&(b.renderBool=!1):delete b.renderBool}}}}),jf="",wp={class:"table-column-config"};function xp(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),f=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",wp,[e.createVNode(f,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:w,text:b,record:N})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:E=>t.changeRenderBool(N,E),checked:N.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:N.width,"onUpdate:value":E=>N.width=E,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[N.style?(e.openBlock(),e.createBlock(d,{key:1,value:N.renderText,"onUpdate:value":E=>N.renderText=E,readOnly:!0,onClick:E=>t.renderSave(N,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(b),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[N.style?(e.openBlock(),e.createBlock(d,{key:1,value:N.headerTemplate,"onUpdate:value":E=>N.headerTemplate=E,readOnly:!0,onClick:E=>t.renderSave(N,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(b),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:N.headerAlign,"onUpdate:value":E=>N.headerAlign=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:N.align,"onUpdate:value":E=>N.align=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:N.fixed,"onUpdate:value":E=>N.fixed=E},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:N.dataFormat,"onUpdate:value":E=>N.dataFormat=E,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[N.dataFormat&&N.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:N.retentiondigit,"onUpdate:value":E=>N.retentiondigit=E,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=w=>t.editorVisible=w),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const kp=te(Cp,[["render",xp],["__scopeId","data-v-afebddc0"]]),_p=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:pp,TableColumnConfig:kp,Editor:_a,AFormItem:v.FormItem,ASelect:v.Select,ASelectOption:v.SelectOption,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ASwitch:v.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Tt),r=e.inject(Xo),l=e.inject(Qt),i=e.inject(Jt),d=e.inject(Ko),s=g=>{l({...en[g]},!1),d()},c=e.computed(()=>{var g;return(g=e.unref(a))==null?void 0:g.type}),p=["showTotalBool","totalName","expandAll"],f=e.computed(()=>rc.map(g=>{const{props:x,title:O,enableProps:S,onlyType:V,excludeType:F}=g,$=[];x.forEach(C=>{typeof C=="string"&&(p.includes(C)?t.isGroupTable&&$.push(C):$.push(C))});let P,y;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(P=typeof S=="string"&&r.value?r.value[S]:void 0,y=ne.pick(e.unref(r),$)):(P=typeof S=="string"&&a.value?a.value[S]:void 0,y=ne.pick(e.unref(a),$)),{title:O,enableProps:P,enablePropsName:S,onlyType:V,excludeType:F,props:y}}).filter(({props:g})=>Object.keys(g).length>0)),m=(g,x)=>{const{onlyType:O,excludeType:S}=g;return O==null&&S==null?!0:O?Ve(x,O):S?!Ve(x,S):!1},h=(g,x)=>(x==null||x.stopPropagation(),g),w=(g,x)=>{x!=null&&l({[x]:g})},b=e.computed(()=>JSON.stringify(e.unref(a),null,2)),N=g=>{try{const x=JSON.parse(g||"{}");l(x,!1)}catch(x){console.error(x)}},E=e.ref(""),u=g=>{try{E.value=g}catch(x){console.error(x)}},B=(g,x)=>{try{i({[x]:g})}catch(O){console.error(O)}},_=e.computed(()=>{var g;return["customGraph"].includes((g=e.unref(a))==null?void 0:g.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:b,updateComponentOptions:N,tableOptions:r,optionCode:E,onEditorChange:u,tableEditorChange:B,onSwitchClick:h,onSwitchChange:w,detailPropsGroups:f,isRenderForm:m,isShowOptionEditor:_}}}),Rf="",Uf="",Sp={class:"style-group"};function Ap(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),f=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Sp,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=b=>t.type=b),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=b=>t.activePanel=b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,b=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b.title},[t.isRenderForm(b,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[b.title?(e.openBlock(),e.createBlock(f,{header:b.title,key:b.title},{extra:e.withCtx(()=>[typeof b.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:b.enableProps,onChange:N=>t.onSwitchChange(N,b.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:b.props,disabled:typeof b.enableProps=="boolean"?!b.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(f,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=b=>t.tablePanel=b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,b=>{var N;return e.openBlock(),e.createElementBlock(e.Fragment,{key:b.title},[b.title&&((N=b.onlyType)!=null&&N.includes(t.componentType))?(e.openBlock(),e.createBlock(f,{header:b.title,key:b.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:b.props,disabled:typeof b.enableProps=="boolean"?!b.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(f,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(w)]),_:1}),e.createVNode(f,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=b=>t.tableEditorChange(b,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(f,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=b=>t.tableEditorChange(b,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Np=te(_p,[["render",Ap],["__scopeId","data-v-2fb3e2ad"]]),Tp=e.defineComponent({name:"Card",components:{CloseOutlined:yo},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(Re),a=e.inject(Lt),r=e.inject(Zo),l=e.computed(()=>{var y;return(y=e.unref(n))==null?void 0:y.filter(C=>C.keyName!=="")}),i=e.computed(()=>{var A,I;const y=[],C=(A=e.unref(l))==null?void 0:A.find(D=>{var U;return D.id===((U=t.control)==null?void 0:U.id)});if(C){const D=C.type,U=ne.pick(C,["value","startTime","endTime"]);(I=Object.keys(U))!=null&&I.length||(U.value="");for(const k in U)if(Object.prototype.hasOwnProperty.call(U,k)){const T=e.unref(r)[k];if(Array.isArray(T)){const L=T.find(M=>Ve(D,M.onlyType));L&&y.push({label:L.label,value:k})}else y.push({label:T.label,value:k})}}return y}),d=()=>{o("delete",t.index),s(t.control.id)};function s(y){const C=e.unref(l).find(A=>A.id===y);if(C){const{type:A,id:I,events:D=[]}=C,U=$t(A),k=D.findIndex(T=>{var L;return T.on===U&&T.target===((L=e.unref(b))==null?void 0:L.id)&&T.emit==="refreshData"});k!==-1&&(D.splice(k,1),a({id:I,events:D}))}}const c=y=>{const C={...t.control};if(C.id=y,y){const A=e.unref(l).find(I=>I.id===y);A&&(C.keyName=A.keyName,u(A,y))}delete C.prop,o("update",C,t.index)},p=e.ref(""),f=()=>{p.value=t.control.id},m=y=>{o("update",{...t.control,prop:y},t.index)},h=y=>{o("update",{...t.control,rule:y},t.index)},w=y=>{const C={...t.control};y==null?delete C.mode:C.mode=y,delete C.conditionLabel,delete C.conditionName,delete C.conditionKey,delete C.conditionValueType,o("update",C,t.index)},b=e.inject(ve),N=e.inject(pe),E=e.computed(()=>{var K;const{classificationList:y=[],seriesList:C=[],leftAxisList:A=[],rightAxisList:I=[],indicators:D=[],rowHeaderList:U=[],queryColumnList:k=[]}=e.unref(N),T=ne.cloneDeep([...y,...C,...A,...I,...D,...U,...k]);if(T!=null&&T.length)for(const J of T)J.id=J.name;const L=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE"},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT"},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT"},...t.intersection.map(J=>({...J,id:J.name,label:J.title||J.label})),...T];((K=e.unref(b))==null?void 0:K.type)==="ecanSelect"&&L.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const M=new Map,j=L.length;for(let J=0;J<j;J++){const ee=L[J],{id:ie}=ee||{};M.set(ie,ee)}return[...M].map(([J,ee])=>ee)});function u(y,C){var k;const{type:A,id:I,events:D=[]}=y,U=$t(A);if(e.unref(p)&&C!==e.unref(p)){const{controlList:T=[]}=e.unref(N);T.find(L=>L.id===e.unref(p))||s(e.unref(p))}D.find(T=>{var L;return T.on===U&&T.target===((L=e.unref(b))==null?void 0:L.id)&&T.emit==="refreshData"})||a({id:I,events:[...D,{on:U,target:(k=e.unref(b))==null?void 0:k.id,emit:"refreshData"}].reverse()})}const B=(y,C)=>{if(y){const{label:A,name:I,id:D,genericType:U}=C||{};o("update",{...t.control,conditionKey:D,conditionLabel:A,conditionName:I,conditionValueType:U},t.index)}else{const A={...t.control};delete A.conditionLabel,delete A.conditionName,delete A.conditionKey,delete A.conditionValueType,o("update",A,t.index)}},_=(y,C)=>{var A;return(A=C==null?void 0:C.keyName)==null?void 0:A.toLowerCase().includes(y==null?void 0:y.toLowerCase())},g=(y,C)=>{var A;return(A=C==null?void 0:C.label)==null?void 0:A.toLowerCase().includes(y==null?void 0:y.toLowerCase())},x=e.computed(()=>{const y=e.unref(E).find(A=>A.id===t.control.conditionKey);let C="";return y&&(C=(y==null?void 0:y.genericType)||""),C==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:C==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:C==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),O=e.computed(()=>{let y=!1;const{id:C=""}=t.control;if(C){const A=e.unref(l).find(D=>D.id===C),I=["table","bar","combograph","line","pie","radar","scatter","list"];Ve(A==null?void 0:A.type,I)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:C=""}=t.control;if(C){const A=e.unref(l).find(I=>I.id===C);(A==null?void 0:A.type)==="ecanRangePicker"&&(y=!0)}return y}),V=e.computed(()=>{let y=!1;const{id:C=""}=t.control;if(C){const A=e.unref(l).find(I=>I.id===C);["ecanDatePicker","ecanRangePicker"].includes(A==null?void 0:A.type)&&(y=!0)}return y});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:f,onPropChange:m,onModeChange:w,onRuleChange:h,conditionKeyOptions:E,onConditionKeyChange:B,idFilterOption:_,filterOption:g,onFormatChange:y=>{o("update",{...t.control,format:y},t.index)},onModelPropChange:y=>{o("update",{...t.control,modelKey:y.target.value},t.index)},ruleOption:x,isShowProp:S,isShowFormat:V,isShowModelProp:O,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),Gf="",zf="",Lp={class:"control-card"};function Ep(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Lp,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:2,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Bp=te(Tp,[["render",Ep],["__scopeId","data-v-00350e9a"]]),Op=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:Bp,AButton:v.Button},setup(t,{expose:o}){const n=e.inject(Re),a=e.inject(pe),r=e.inject(Be),l=e.computed(()=>{var m;const f=((m=e.unref(a))==null?void 0:m.controlList)||[];for(const h of f)h.conditionKey&&!To(h,"rule")&&(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL");return f}),i=e.ref(null),d=f=>{const m={...e.unref(a),...f,sqlConditions:vn({...e.unref(a),...f},e.unref(n))};r(m)},s=()=>{var m;const f=(m=e.unref(l))==null?void 0:m.slice();f.push({}),d({controlList:f})},c=f=>{var h;const m=(h=e.unref(l))==null?void 0:h.slice();m.splice(f,1),d({controlList:m})},p=(f,m)=>{var w;const h=(w=e.unref(l))==null?void 0:w.slice();h[m]=f,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),Hf="",Vp={class:"control-group"},Ip={class:"control-group-header"},$p={class:"control-group-content"};function Fp(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",Vp,[e.createElementVNode("div",Ip,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",$p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const Dp=te(Op,[["render",Fp],["__scopeId","data-v-365e5dd8"]]),vp=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:f}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,f)=>{a(p),c?f<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f,calcType:m="COLUMN",builtInFormula:h,builtInValueSource:w,builtInCalcWay:b,formula:N,conditions:E,aggregate:u}=i;let B;return E&&(B=r(E)),{label:d.trim(),columnName:s,location:c,show:p,calcType:m,hrpIndexCode:f,aggregate:u,builtInFormula:h,builtInValueSource:w,builtInCalcWay:b,formula:N,conditions:B}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:f="1",layer:m,chartType:h,classificationList:w=[],seriesList:b=[],leftAxisList:N=[],rightAxisList:E=[],queryColumnList:u=[],indicators:B=[],dataSourceId:_,idxLibMode:g,preview:x=!1}=i||{};m==null&&(Ve(d,"table")?m="1":m="2");let O;if(Array.isArray(w)&&w.length>0){const $=w.length;for(let P=0;P<$;P++){const y=w[P]||{},{label:C="",name:A="",show:I=!1,sort:D,customGroup:U,conditions:k}=y;if(I||$===1){O={label:C.trim(),columnName:A,show:I,sort:D,customGroup:U,conditions:r(k)};break}}}let S;if(Array.isArray(b)&&b.length>0){const $=b.length;for(let P=0;P<$;P++){const y=b[P]||{},{label:C="",name:A="",show:I=!1,sort:D,customGroup:U,conditions:k}=y;if(I||$===1){S={label:C.trim(),columnName:A,show:I,sort:D,customGroup:U,conditions:r(k)};break}}}const V=[];u==null||u.forEach($=>{V.push(o($))});const F=[];if(N==null||N.forEach($=>{$.location="LEFT",F.push(l($))}),E==null||E.forEach($=>{$.location="RIGHT",F.push(l($))}),B==null||B.forEach($=>{$.location="LEFT",F.push(l($))}),!(m==="1"&&V.length===0)&&!(m==="2"&&F.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:f,layer:m,chartType:h,classification:O,series:S,indicatorList:F,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:_,idxLibMode:g,preview:x})}catch($){console.error($)}}},Sa=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Xt=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=c.match(p);for(let m=0;m<f.length;m++){const h=f[m],w=l[h];w!=null&&(c=c.replace(h,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Sa(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),t},Nt=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Sa(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},Pp=(t,o,n)=>{switch(t.type){case"bar":return Mp(t,o,n);case"line":return jp(t,o,n);case"pie":return Rp(t,o,n);case"comboGraph":return Up(t,o,n);default:return{}}},Mp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,f=[];for(let m=0;m<p;m++){const h={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},f.push(h)}return f}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let f="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:b,name:N,value:E,data:u}=c[h]||{};h===0&&(f+=`${N}<br/>`),f+=Xt(m,{textData:{marker:w,name:N,value:E,a:b,b:N,c:E,...u}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},jp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let f=0;f<p;f++)c.push({type:"line",...i[f],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let f="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:b,name:N,value:E,data:u}=c[h]||{};h===0&&(f+=`${N}<br/>`),f+=Xt(m,{textData:{marker:w,name:N,value:E,a:b,b:N,c:E,...u}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},Rp=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:f}=l||{};return Xt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...f}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:zi(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},Up=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let f=0;f<c;f++){const m=p[f];s.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[f]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Nt(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");const m=t.seriesTypes;for(let h=0;h<c;h++){const w=m[h],{tooltipFormatter:b}=w||{},{marker:N,seriesName:E,name:u,value:B,data:_}=s[h]||{};h===0&&(p+=`${u}<br/>`),p+=Xt(b||f,{textData:{marker:N,name:u,value:B,seriesName:E,a:E,b:u,c:B,..._}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},Gp=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let m=0;m<d;m++){const h=a[m],{label:w,value:b}=h,N={...t[0],value:t[0][b]};r.add(w),p.push(N)}const f=t[0][n]||"";l.set(f,p)}else for(let p=0;p<i;p++){const f=t[p],m=f[n];r.add(m);for(let h=0;h<d;h++){const w=a[h],{label:b,value:N}=w,E={...f,value:f[N]};if(l.has(b)){const u=l.get(b);u.push(E),l.set(b,u)}else l.set(b,[E])}}const s=Array.from(r),c=[];for(const[p,f]of l)c.push({name:p,data:f});return{dimensions:s,dataset:c}},zp=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const f=t[p],m=f[n]||"",h=f[a]||"",w=f[r]||"";if(l.add(m),i.has(w)){const b=i.get(w);b.push({name:m,value:h,...f}),i.set(w,b)}else i.set(w,[{name:m,value:h,...f}])}const s=Array.from(l),c=[];for(const[p,f]of i)c.push({name:p,data:f});return{dimensions:s,dataset:c}},Hp=e.defineComponent({name:"ChartGraph",components:{ASpin:v.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Le);let l=null;const i=e.inject(Ee)||"",d=e.inject(pe)||{},s=e.inject(Tt)||{},c=e.ref(null),p=e.ref(null),f=e.ref(),m=e.ref(!1),h=e.ref(!1),w=e.computed(()=>h.value?$a:12),b=e.ref({}),N=e.ref(),E=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return N.value;const F=Pp(V,e.unref(b),w.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:V.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:V.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:V.titleText,subtext:V.titleSubtext,left:"center"},grid:{top:V.gridTop,bottom:V.gridBottom,left:V.gridLeft,right:V.gridRight,containLabel:V.gridContainLabel},color:V.colors,...F}}),u=(V=[],F,$=!1)=>{const P=$?F:null;b.value=Gp(V,P)},B=(V=[],F)=>{b.value=zp(V,F)},_=async()=>{var V,F,$;try{const P=vp({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:i});m.value=!0;const y=await P(),{columns:C=[],rows:A=[]}=((F=y==null?void 0:y.data)==null?void 0:F.data)??{};if((($=e.unref(n.value))==null?void 0:$.type)==="pie"){let I=[];if(C.length>0){const D=C[0],U=C[1];I=A.map(k=>({name:k[D],value:k[U]}))}B(I)}else{let I;C.length>0&&(I={name:C[0],types:C.slice(1).map(D=>({label:D,value:D}))}),u(A,I,!0)}}catch(P){console.error(P)}finally{m.value=!1}},g={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},x=()=>{e.unref(b).dataset.length===0?f.value.setOption(g):f.value.setOption(E.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&_()},S=()=>{var V;(V=f.value)==null||V.resize()};return e.watch(E,()=>{x()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const F=eval;N.value=F(V)}catch(F){console.error(F)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(S),l.observe(p.value)),f.value=Ia.init(c.value)}),e.onBeforeUnmount(()=>{f.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:O}),{echartRef:c,loading:m}}}),Wf="",Wp={class:"ecan-chart-graph",ref:"chartWrapRef"},qp={style:{width:"100%",height:"100%"},ref:"echartRef"};function Yp(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",Wp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",qp,null,512)]),_:1},8,["spinning"])],512)}const Aa=te(Hp,[["render",Yp],["__scopeId","data-v-8049fed2"]]),Kp=e.defineComponent({name:"DataConfig",components:{DataGroup:ac,StyleGroup:Np,ChartGraph:Aa,ATabs:v.Tabs,ATabPane:v.TabPane,ControlGroup:Dp},setup(){var _;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(ve),r=e.inject(Yo),l=e.inject(pe),i=e.inject(Re),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const g=ne.cloneDeep(e.unref(a));c(g);const x=ne.pick(g,ne.without(Object.keys(g),"position","top","left","width","height"));Ve(g.type,d)?(x.height=g.height,x.width=g.width):x.height="290px";const O=ne.cloneDeep(e.unref(l));return O.pageMode="design",O.componentList=i,O.preview=!0,{...x,graphicConfig:O,toolboxShow:!1}});function c(g){var x,O,S,V;["#ffffff","#fff"].includes((x=g==null?void 0:g.color)==null?void 0:x.toLowerCase())&&(g.color="#000"),["#ffffff","#fff"].includes((O=g==null?void 0:g.variableColor)==null?void 0:O.toLowerCase())&&(g.variableColor="#000"),["#ffffff","#fff"].includes((S=g==null?void 0:g.increaseColor)==null?void 0:S.toLowerCase())&&(g.increaseColor="#000"),["#ffffff","#fff"].includes((V=g==null?void 0:g.declineColor)==null?void 0:V.toLowerCase())&&(g.declineColor="#000")}const p=e.computed(()=>{let g=!0;return Ve(e.unref(s).type,d)&&(g=!1),g}),f=e.computed(()=>{var g;return(g=e.unref(s))==null?void 0:g.type}),m=e.computed(()=>{var g;return!!((g=e.unref(s))!=null&&g.isGroupTable)}),h=g=>{const x=g==="1";x&&f.value==="table"&&B(),window.changeShowTable&&window.changeShowTable(x),g==="3"&&u()},w=e.ref(),b=e.inject(Le),N=e.unref(e.inject(Ee)),E=(_=window==null?void 0:window.config)==null?void 0:_.pageId;function u(){var $;const{leftAxisList:g=[],rightAxisList:x=[],queryColumnList:O=[],indicators:S=[]}=e.unref(l),V=[...g,...x,...O,...S],F={};for(const P of V){const{id:y="",indexCode:C=""}=P;y&&!To(P,"calcType")&&!F[y]&&(F[y]=C)}if(($=Object.keys(F))!=null&&$.length){const P=[];for(const y in F)P.push(new Promise((C,A)=>{b.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:E,indexGuid:y,indexCode:F[y],dataSourceId:""},{headers:{Authentication:N,operateContext:"ygt"}}).then(I=>{var k;const{success:D,data:U=[]}=I.data;D&&((k=U==null?void 0:U.dataViewColumns)!=null&&k.length)?C(U.dataViewColumns):A(U)}).catch(I=>{A(I)})}));Promise.all(P).then(y=>{if(y!=null&&y.length){const C=y.reduce((A,I)=>A.filter(D=>I.find(U=>U.typeGuid===D.typeGuid)));w.value=C.filter(A=>A.typeGuid)}})}}const B=()=>{var x;let g;r&&f.value==="table"?g=window.updateConfig:g=(x=e.unref(n))==null?void 0:x.refreshData,typeof g=="function"&&g()};return e.provide(Ko,B),e.watch(l,()=>{B()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:m,onChange:h,component:s,fullWidth:p,renderUsedComponents:i,intersection:w}}}),qf="",Xp={class:"data-config"},Qp={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Jp(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",Xp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=m=>t.activeKey=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",Qp,null,512)):e.withDirectives((e.openBlock(),e.createBlock(f,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const Zp=te(Kp,[["render",Jp],["__scopeId","data-v-df437f90"]]),ef=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Rl,DataConfig:Zp},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var g;return((g=e.unref(i))==null?void 0:g.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?ne.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?ne.cloneDeep(e.unref(i).chartsOptions):e.ref(ne.cloneDeep(en.line));p=e.ref(p);let f=e.unref(i).tableOptions?ne.cloneDeep(e.unref(i).tableOptions):e.ref(ne.cloneDeep(Fa));f=e.ref(f);const m=e.ref([]),h=g=>{m.value=g},w=g=>{c.value={...e.unref(c),...e.unref(g)}},b=(g,x=!0)=>{x?p.value={...e.unref(p),...e.unref(g)}:p.value={...e.unref(g)}},N=g=>{f.value={...e.unref(f),...e.unref(g)}},E=()=>m,u=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=ne.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=ne.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},B=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(f),tableColumns:e.unref(d)});window.getIndicatorData=B,t.request&&e.provide(Le,t.request),e.provide(qo,{setDataList:h,getDataList:E});const _=g=>{n("updateUsedComponent",g)};return e.provide(ve,i),e.provide(pe,c),e.provide(Tt,p),e.provide(Xo,f),e.provide(Zt,r),e.provide(Yo,s),e.provide(Ee,l),e.provide(Be,w),e.provide(Qt,b),e.provide(Jt,N),e.provide(Re,t.renderUsedComponentList),e.provide(Lt,_),e.provide(Zo,t.mapAttributeProps),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:u}),{isUpdate:a}}}),Yf="",tf={key:0,class:"config-modal"},of={class:"config-modal-left"},nf={class:"config-modal-right"};function af(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",of,[e.createVNode(i)]),e.createElementVNode("div",nf,[e.createVNode(d)])]))}const Na=Wo(te(ef,[["render",af],["__scopeId","data-v-8e2109bf"]])),Ta=Wo(Aa),La=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ta,EcanIndicatorLibrary:Na},Symbol.toStringTag,{value:"Module"})),rf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(La).forEach(a=>{const r=La[a];r.install&&t.use(r)})}};he.EcanChartGraph=Ta,he.EcanIndicatorLibrary=Na,he.default=rf,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
64
64
  //# sourceMappingURL=index.umd.js.map