@ecan-bi/indicator-library 1.0.75 → 1.0.76

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,4 +1,4 @@
1
- /*! @ecan-bi/indicator-library@1.0.75 */
1
+ /*! @ecan-bi/indicator-library@1.0.76 */
2
2
  (function(ke,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):(ke=typeof globalThis<"u"?globalThis:ke||self,e(ke["@ecan-bi/indicator-library"]={},ke.Vue,ke.LodashEs,ke.AntDesignVue,ke.Draggable,null,null,ke.Dayjs,null,ke.MonacoEditor,null,ke.Echarts))})(this,function(ke,e,J,$,Tt,Nf,Af,de,Tf,tr,Ef,or){var er;"use strict";function nr(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 ar=nr(or),pn=(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},Me="$request",Be=((er=window==null?void 0:window.config)==null?void 0:er.indicatorURL)||"",ve="INDICATOR_TOKEN",un="DATA_LIST",Ye="SELECTED_COMPONENT",me="GRAPHIC_CONFIG",Se="UPDATE_GRAPHIC_CONFIG",fn="SHOW_STYLE_CONFIG",mn="REFRESH_DATA",Gt="CHARTS_OPTIONS",hn="TABLE_OPTIONS",rr=18,ho="UPDATE_CHARTS_OPTIONS",yo="UPDATE_TABLE_OPTIONS",go="SOURCE_TYPE",yn="CHANGE_CONDITION",gn="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",zt="UPDATE_USED_COMPONENT",bn="MAP_ATTRIBUTE_PROPS",Cn="PAGE_CONFIG",wn={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%"}},lr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},ir=e.defineComponent({name:"DataViewList",components:{ASpin:$.Spin,ATreeSelect:$.TreeSelect,Draggable:Tt},setup(){var S;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(me),a=e.inject(Se),r=e.computed(()=>{var h;return((h=e.unref(n))==null?void 0:h.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(S=window==null?void 0:window.config)==null?void 0:S.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var E,B;const h=r.value;i.value=!0;try{const{data:I}=await t.post(`${Be}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,I.success&&((E=s.value)==null||E.push(l),s.value=(B=s.value)==null?void 0:B.concat(p([I.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(h=[],E)=>{const B=[];return h.forEach(I=>{B.push({id:I.id,pId:E??I.parentId,value:I.id,title:I.name,isLeaf:I.leaf||!1,nature:I.nature,selectable:I.leaf||!1})}),B},u=async(h,E)=>{var A;let B=0;if(h){const{value:V}=h.dataRef;B=V}const{data:I}=await t.post(`${Be}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:B},{headers:{Authentication:o,operateContext:"ygt"}});I.success&&(s.value=(A=e.unref(s))==null?void 0:A.concat(p(I.data)),E&&e.unref(r)&&await c())},m=h=>{w(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(un,{setDataList:h=>h}),C=e.ref(!1),f=e.ref([]),w=async h=>{if(h){f.value=[],C.value=!0;try{const E=await t.post(`${Be}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:B,data:I={}}=E.data;if(C.value=!1,B){const{rows:A=[]}=I;A==null||A.forEach(V=>{var O;const N=((O=V==null?void 0:V.dataViewColumns)==null?void 0:O.map(v=>({...v,show:!0})))||[];f.value=[...e.unref(f),...N]}),g(e.unref(f))}}catch{C.value=!1}}},_=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],k=(h,E)=>{const B=E[h.oldIndex];if(B){const I={...B,label:B.name,name:B.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(I))}};return e.onMounted(async()=>{await u(void 0,!0),w(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:C,onDataViewIdChange:m,mapGenericType:_,onDragStart:k}}}),Ff="",oe=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},sr={class:"data-view-list"},cr={class:"columns"},dr={class:"column-item"},pr={class:"column-item-name"};function ur(t,o,n,a,r,i){const s=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",sr,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{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",cr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{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",dr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",pr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const fr=oe(ir,[["render",ur],["__scopeId","data-v-4a66f7d2"]]);function Oe(t,o){mr(t)&&(t="100%");var n=hr(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 mr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function hr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function yr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ht(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bo(t){return t.length===1?"0"+t:String(t)}function gr(t,o,n){return{r:Oe(t,255)*255,g:Oe(o,255)*255,b:Oe(n,255)*255}}function Co(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 br(t,o,n){var a,r,i;if(t=Oe(t,360),o=Oe(o,100),n=Oe(n,100),o===0)r=n,i=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,d=2*n-s;a=Co(d,s,t+1/3),r=Co(d,s,t),i=Co(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function Cr(t,o,n){t=Oe(t,255),o=Oe(o,255),n=Oe(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),i=0,s=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(o-n)/d+(o<n?6:0);break;case o:i=(n-t)/d+2;break;case n:i=(t-o)/d+4;break}i/=6}return{h:i,s:l,v:s}}function wr(t,o,n){t=Oe(t,360)*6,o=Oe(o,100),n=Oe(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:c*255,g:p*255,b:u*255}}function kr(t,o,n,a){var r=[bo(Math.round(t).toString(16)),bo(Math.round(o).toString(16)),bo(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 kn(t){return Te(t)/255}function Te(t){return parseInt(t,16)}var _n={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 Et(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,i=null,s=!1,d=!1;return typeof t=="string"&&(t=Sr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=gr(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=Ht(t.s),r=Ht(t.v),o=wr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=Ht(t.s),i=Ht(t.l),o=br(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=yr(n),{ok:s,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 _r="[-\\+]?\\d+%?",xr="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(xr,")|(?:").concat(_r,")"),wo="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),ko="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wo),rgba:new RegExp("rgba"+ko),hsl:new RegExp("hsl"+wo),hsla:new RegExp("hsla"+ko),hsv:new RegExp("hsv"+wo),hsva:new RegExp("hsva"+ko),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 Sr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(_n[t])t=_n[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=je.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=je.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=je.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=je.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=je.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=je.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=je.hex8.exec(t),n?{r:Te(n[1]),g:Te(n[2]),b:Te(n[3]),a:kn(n[4]),format:o?"name":"hex8"}:(n=je.hex6.exec(t),n?{r:Te(n[1]),g:Te(n[2]),b:Te(n[3]),format:o?"name":"hex"}:(n=je.hex4.exec(t),n?{r:Te(n[1]+n[1]),g:Te(n[2]+n[2]),b:Te(n[3]+n[3]),a:kn(n[4]+n[4]),format:o?"name":"hex8"}:(n=je.hex3.exec(t),n?{r:Te(n[1]+n[1]),g:Te(n[2]+n[2]),b:Te(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Yt=2,xn=.16,Nr=.05,Ar=.05,Tr=.15,Sn=5,Nn=4,Er=[{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 An(t){var o=t.r,n=t.g,a=t.b,r=Cr(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Wt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(kr(o,n,a,!1))}function Vr(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 Tn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Yt*o:Math.round(t.h)+Yt*o:a=n?Math.round(t.h)+Yt*o:Math.round(t.h)-Yt*o,a<0?a+=360:a>=360&&(a-=360),a}function En(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-xn*o:o===Nn?a=t.s+xn:a=t.s+Nr*o,a>1&&(a=1),n&&o===Sn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Vn(t,o,n){var a;return n?a=t.v+Ar*o:a=t.v-Tr*o,a>1&&(a=1),Number(a.toFixed(2))}function _o(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Et(t),r=Sn;r>0;r-=1){var i=An(a),s=Wt(Et({h:Tn(i,r,!0),s:En(i,r,!0),v:Vn(i,r,!0)}));n.push(s)}n.push(Wt(a));for(var d=1;d<=Nn;d+=1){var l=An(a),c=Wt(Et({h:Tn(l,d),s:En(l,d),v:Vn(l,d)}));n.push(c)}return o.theme==="dark"?Er.map(function(p){var u=p.index,m=p.opacity,g=Wt(Vr(Et(o.backgroundColor||"#141414"),Et(n[u]),m*100));return g}):n}var xo={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"},So={},No={};Object.keys(xo).forEach(function(t){So[t]=_o(xo[t]),So[t].primary=So[t][5],No[t]=_o(xo[t],{theme:"dark",backgroundColor:"#141414"}),No[t].primary=No[t][5]});var Ln=[],Vt=[],Lr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Br(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Or(t,o){if(o=o||{},t===void 0)throw new Error(Lr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Ln.indexOf(a);r===-1&&(r=Ln.push(a)-1,Vt[r]={});var i;return Vt[r]!==void 0&&Vt[r][n]!==void 0?i=Vt[r][n]:(i=Vt[r][n]=Br(),n==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}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){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}function Fr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Dr(t,o){Fr(t,"[@ant-design/icons-vue] ".concat(o))}function On(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Ao(t,o,n){return n?e.h(t.tag,Bn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function In(t){return _o(t)[0]}function Fn(t){return t?Array.isArray(t)?t:[t]:[]}var $r=`
3
3
  .anticon {
4
4
  display: inline-block;
@@ -55,10 +55,10 @@
55
55
  }
56
56
  `,Dn=!1,Mr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$r;e.nextTick(function(){Dn||(typeof window<"u"&&window.document&&window.document.documentElement&&Or(o,{prepend:!0}),Dn=!0)})},vr=["icon","primaryColor","secondaryColor"];function Pr(t,o){if(t==null)return{};var n=jr(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function jr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function qt(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){Rr(t,r,n[r])})}return t}function Rr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Lt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Ur(t){var o=t.primaryColor,n=t.secondaryColor;Lt.primaryColor=o,Lt.secondaryColor=n||In(o),Lt.calculated=!!n}function Gr(){return qt({},Lt)}var yt=function(o,n){var a=qt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=Pr(a,vr),l=Lt;if(i&&(l={primaryColor:i,secondaryColor:s||In(i)}),Mr(),Dr(On(r),"icon should be icon definiton, but got ".concat(r)),!On(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=qt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Ao(c.icon,"svg-".concat(c.name),qt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};yt.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},yt.inheritAttrs=!1,yt.displayName="IconBase",yt.getTwoToneColors=Gr,yt.setTwoToneColors=Ur;const To=yt;function zr(t,o){return qr(t)||Wr(t,o)||Yr(t,o)||Hr()}function Hr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
57
57
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yr(t,o){if(t){if(typeof t=="string")return $n(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 $n(t,o)}}function $n(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,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function qr(t){if(Array.isArray(t))return t}function Mn(t){var o=Fn(t),n=zr(o,2),a=n[0],r=n[1];return To.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Kr(){var t=To.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Qr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Xr(t,o){return tl(t)||el(t,o)||Zr(t,o)||Jr()}function Jr(){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 Zr(t,o){if(t){if(typeof t=="string")return vn(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 vn(t,o)}}function vn(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 el(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function tl(t){if(Array.isArray(t))return t}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){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function ol(t,o){if(t==null)return{};var n=nl(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function nl(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Mn("#1890ff");var gt=function(o,n){var a,r=Pn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,m=ol(r,Qr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),C=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var w=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,_=Fn(p),k=Xr(_,2),S=k[0],h=k[1];return e.createVNode("span",Pn({role:"img","aria-label":s.name},m,{onClick:u,class:g}),[e.createVNode(To,{class:C,icon:s,primaryColor:S,secondaryColor:h,style:w},null)])};gt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},gt.displayName="AntdIcon",gt.inheritAttrs=!1,gt.getTwoToneColor=Kr,gt.setTwoToneColor=Mn;const be=gt;var al={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 rl=al;function jn(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){ll(t,r,n[r])})}return t}function ll(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(be,jn({},a,{icon:rl}),null)};Vo.displayName="AppstoreAddOutlined",Vo.inheritAttrs=!1;const Lo=Vo;var il={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 sl=il;function Rn(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 Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(be,Rn({},a,{icon:sl}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const dl=Bo;var pl={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 ul=pl;function Un(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){fl(t,r,n[r])})}return t}function fl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(be,Un({},a,{icon:ul}),null)};Oo.displayName="CaretRightOutlined",Oo.inheritAttrs=!1;const ml=Oo;var hl={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 yl=hl;function Gn(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 Io=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(be,Gn({},a,{icon:yl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Kt=Io;var bl={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 Cl=bl;function zn(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){wl(t,r,n[r])})}return t}function wl(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=zn({},o,n.attrs);return e.createVNode(be,zn({},a,{icon:Cl}),null)};Fo.displayName="CopyOutlined",Fo.inheritAttrs=!1;const kl=Fo;var _l={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 xl=_l;function Hn(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){Sl(t,r,n[r])})}return t}function Sl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Do=function(o,n){var a=Hn({},o,n.attrs);return e.createVNode(be,Hn({},a,{icon:xl}),null)};Do.displayName="DeleteOutlined",Do.inheritAttrs=!1;const Yn=Do;var Nl={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 Al=Nl;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){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 $o=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(be,Wn({},a,{icon:Al}),null)};$o.displayName="DoubleRightOutlined",$o.inheritAttrs=!1;const El=$o;var Vl={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=Vl;function qn(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){Bl(t,r,n[r])})}return t}function Bl(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=qn({},o,n.attrs);return e.createVNode(be,qn({},a,{icon:Ll}),null)};Mo.displayName="DownOutlined",Mo.inheritAttrs=!1;const Ol=Mo;var Il={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 Fl=Il;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){Dl(t,r,n[r])})}return t}function Dl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var vo=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(be,Kn({},a,{icon:Fl}),null)};vo.displayName="InfoCircleOutlined",vo.inheritAttrs=!1;const $l=vo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const vl=Ml;function Qn(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 Po=function(o,n){var a=Qn({},o,n.attrs);return e.createVNode(be,Qn({},a,{icon:vl}),null)};Po.displayName="MenuOutlined",Po.inheritAttrs=!1;const Xn=Po;var jl={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 Rl=jl;function Jn(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 jo=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(be,Jn({},a,{icon:Rl}),null)};jo.displayName="MinusCircleOutlined",jo.inheritAttrs=!1;const Gl=jo;var zl={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 Hl=zl;function Zn(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){Yl(t,r,n[r])})}return t}function Yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ro=function(o,n){var a=Zn({},o,n.attrs);return e.createVNode(be,Zn({},a,{icon:Hl}),null)};Ro.displayName="PlusCircleOutlined",Ro.inheritAttrs=!1;const Wl=Ro;var ql={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=ql;function ea(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){Ql(t,r,n[r])})}return t}function Ql(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=ea({},o,n.attrs);return e.createVNode(be,ea({},a,{icon:Kl}),null)};Uo.displayName="PlusOutlined",Uo.inheritAttrs=!1;const Xl=Uo;var Jl={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:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Zl=Jl;function ta(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){ei(t,r,n[r])})}return t}function ei(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=ta({},o,n.attrs);return e.createVNode(be,ta({},a,{icon:Zl}),null)};Go.displayName="QuestionCircleOutlined",Go.inheritAttrs=!1;const ti=Go;var oi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const ni=oi;function oa(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){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=oa({},o,n.attrs);return e.createVNode(be,oa({},a,{icon:ni}),null)};zo.displayName="ReloadOutlined",zo.inheritAttrs=!1;const ri=zo;var li={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 ii=li;function na(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){si(t,r,n[r])})}return t}function si(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=na({},o,n.attrs);return e.createVNode(be,na({},a,{icon:ii}),null)};Ho.displayName="SettingOutlined",Ho.inheritAttrs=!1;const ci=Ho,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:ml,CaretDownOutlined:dl,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:Tt},setup(){var E;const t=(E=window==null?void 0:window.config)==null?void 0:E.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var B;return(B=e.unref(a))==null?void 0:B.graphicConfig}),i=e.computed(()=>{var B;return(B=e.unref(r))==null?void 0:B.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const B={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const I=await o.post(`${Be}/diagram/sourceList`,B,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:A,data:V={}}=I.data;if(A){const{rows:N=[],total:O=0}=V;N==null||N.forEach(v=>{var P;v.show=!1,(P=v.dataViewColumns)==null||P.forEach(x=>{x.show=!0,x.edit=!1,x.title&&(x.label=x.title)})}),s.value=N,l.totalResult=+O}}catch{d.value=!1}},u=B=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[B],m=B=>{s.value[B].show=!s.value[B].show},g=()=>{l.currentPage=1,p()},C=J.debounce(()=>{l.currentPage=1,p()},200),f=(B,I)=>{l.pageSize=I,l.currentPage=B,p()};e.onMounted(()=>{p()});const w=e.inject(me),_=e.computed(()=>{const B=["classificationList","rowHeaderList","dimensionList"];let I=[];for(const A in e.unref(w))if(Object.prototype.hasOwnProperty.call(e.unref(w),A)&&B.includes(A)){const V=e.unref(w)[A];Array.isArray(V)&&(I=I.concat(V))}return I});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:C,onPaginationChange:f,searchText:c,setItemDisabled:(B=[])=>{let I=!1;for(const A of e.unref(_))if(!B.find(N=>N.typeGuid===A.typeGuid)){I=!0;break}return I},onDragStart:(B,I)=>{const A=I.dataViewColumns[B.oldIndex];A&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...A,dataTo:I.dataTo})),I.dataTo==="1"&&(I!=null&&I.hrpIndexVariates)&&sessionStorage.setItem("indicator-variates",JSON.stringify(I.hrpIndexVariates)))},getSourceType:B=>B==="0"?"【指标库】":B==="1"?"【视图】":"【其他】"}}}),Df="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(s,{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",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:C=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":C=>m.dataViewColumns=C,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:C=>t.onDragStart(C,m)},{item:e.withCtx(({element:C})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(C.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(C.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{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 Ci=oe(di,[["render",bi],["__scopeId","data-v-237f17b8"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:fr},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=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(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),aa={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},sortList:{type:Array,default:()=>[]}},components:{Draggable:Tt,AModal:$.Modal,AButton:$.Button,ASelect:$.Select,ASelectOption:$.SelectOption,DeleteOutlined:Yn},setup(t,{expose:o}){var V;const n=(V=window==null?void 0:window.config)==null?void 0:V.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(me),s=e.inject(Se),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=e.ref("1"),u=e.ref([]),m=N=>t.sortList.filter(O=>!e.unref(u).find(v=>v.columnName===O.name)||N.columnName===O.name),g=async()=>{try{const N=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:O,data:v=[]}=N.data;O&&(c.value=v==null?void 0:v.slice(0,200))}catch(N){console.error(N)}},C=()=>{var x,F;const N=((x=e.unref(i)[t.type])==null?void 0:x.slice())||[],O=N[t.index],{label:v,name:P}=t.item;e.unref(p)==="2"?O.sort={label:v,columnName:P,type:"CUSTOM",customOrderColumns:e.unref(c)}:e.unref(p)==="1"&&((F=e.unref(u))!=null&&F.length?O.sort=J.cloneDeep(e.unref(u)):delete O.sort),s({[t.type]:N})};let f=!1;const w=()=>{f=!0},_=e.ref(!1),k=N=>{var v;const{sort:O}=N;O?Array.isArray(O)?(p.value=((v=O[0])==null?void 0:v.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=J.cloneDeep(O):u.value=[]):(p.value=(O==null?void 0:O.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=[J.cloneDeep(O)]:u.value=[]):u.value=[],_.value=!0},S=()=>{_.value=!1},h=()=>{e.unref(p)==="2"?(f&&C(),f=!1):C(),S()};return o({showModal:k}),e.watch(_,N=>{var O,v;if(N){const P=(v=(O=t.item)==null?void 0:O.sort)==null?void 0:v.customOrderColumns;P==null?g():c.value=P}else c.value=[];window.changeShowTable&&window.changeShowTable(!N)},{flush:"post"}),{visible:_,customSortList:c,activeKey:p,combSortList:u,getSortOptions:m,onChange:w,onDeleteConfig:()=>{var v;const N=((v=e.unref(i)[t.type])==null?void 0:v.slice())||[],O=N[t.index];delete O.sort,s({[t.type]:N}),S()},onCancel:h,onAddSort:()=>{e.unref(u).push({label:"",columnName:null,type:"COMBINATION",order:null})},handleDeleteSort:N=>{u.value.splice(N,1)},onColumnChange:N=>{const O=e.unref(u).find(v=>v.columnName===N);if(O){const v=t.sortList.find(P=>P.name===N);v&&(O.label=v.label,v.defaultCode?O.defaultCode=v.defaultCode:delete O.defaultCode)}}}}}),$f="",Si={class:"button-wrapper"},Ni={class:"list-wrapper"},Ai={class:"button-wrapper"},Ti={class:"sort-item"};function Ei(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("delete-outlined"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("draggable"),m=e.resolveComponent("a-tabs"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(g,{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.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[1]||(o[1]=C=>t.activeKey=C)},{default:e.withCtx(()=>[e.createVNode(p,{key:"1",tab:"组合排序"},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createVNode(s,{primary:"",onClick:t.onAddSort},{default:e.withCtx(()=>[e.createTextVNode(" 新增 ")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.combSortList,(C,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sort-row",key:f},[e.createVNode(d,{value:C.columnName,"onUpdate:value":w=>C.columnName=w,style:{width:"200px"},placeholder:"维度/指标",options:t.getSortOptions(C),fieldNames:{label:"label",value:"name"},onChange:t.onColumnChange},null,8,["value","onUpdate:value","options","onChange"]),e.createVNode(d,{value:C.order,"onUpdate:value":w=>C.order=w,style:{"margin-left":"10px",width:"100px"},placeholder:"升/降序"},{default:e.withCtx(()=>[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})]),_:2},1032,["value","onUpdate:value"]),e.createVNode(c,{style:{color:"red","margin-left":"10px"},onClick:w=>t.handleDeleteSort(f)},null,8,["onClick"])]))),128))])]),_:1}),e.createVNode(p,{key:"2",tab:"自定义排序","force-render":""},{default:e.withCtx(()=>[e.createElementVNode("div",Ai,[e.createVNode(s,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(u,{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",Ti,e.toDisplayString(C),1)]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["visible","onCancel"])}const Vi=oe(xi,[["render",Ei],["__scopeId","data-v-4cf86bd7"]]),Li=e.defineComponent({name:"CustomGroupModal",directives:{focus:aa},components:{CloseOutlined:Kt,AModal:$.Modal,ASelect:$.Select,ASelectOption:$.SelectOption,AButton:$.Button,AInput:$.Input,ACheckbox:$.Checkbox,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ATag:$.Tag,ACheckableTag:$.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(Me),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(ve));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const y=e.unref(c).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(c).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){$.message.error("创建分组名不能空");return}e.unref(p).has(y)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:y,data:[]}),i=!0)},C=y=>{e.unref(c).splice(y,1),i=!0},f=e.ref(null),w=()=>{if(e.unref(m)===0){$.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[y]){$.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const M=e.unref(c)[D];e.unref(c)[D].data=M.data.filter(z=>(z.checked&&b.push({...z,checked:!1}),!z.checked))}e.unref(c)[y].data=[...b,...e.unref(c)[y].data],i=!0},_=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},S=(y,b)=>{const T=y.target.value;e.unref(p).has(T)&&$.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},h=e.inject(me),E=e.inject(Se),B=e.computed(()=>e.unref(h).source),I=e.computed(()=>e.unref(h).dataViewId),A=e.ref(!1),V=()=>{var K,Q;const y=e.unref(c);let b="";e.unref(A)&&(b=(K=y[0])==null?void 0:K.title);const T=y==null?void 0:y.length,D={};for(let ee=1;ee<T;ee++){const ae=y[ee]||{},{title:ge,data:ye}=ae;D[ge]=(ye==null?void 0:ye.map(Ve=>Ve.label))||[]}const M=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],z=M[t.index];z.customGroup={groupInfoMap:D,otherGroupName:b},E({[t.type]:M})},N=e.ref(!1),O=()=>{N.value=!0},v=()=>{N.value=!1},P=()=>{v(),i&&V(),i=!1},x=()=>{i=!0},F=new Set,L=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,T=y.groupInfoMap;(b===""||b==null)&&(A.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const M in T)if(Object.prototype.hasOwnProperty.call(T,M)){const K=T[M].map(Q=>(F.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:M,data:K},D++}await j()},j=async()=>{var y;try{const b=await n.post(`${Be}/diagram/groupvalue`,{source:e.unref(B),dataViewId:e.unref(I),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const M=[];(y=D==null?void 0:D.slice(0,200))==null||y.forEach(z=>{F.has(z)||M.push({label:z,checked:!1})}),e.unref(c)[0].data=M}}catch(b){console.error(b)}};return e.watch(N,y=>{y&&L(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),o({showModal:O}),{visible:N,title:s,activeKey:l,customGroupList:c,onCancel:P,useOtherGroup:A,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:C,onMoveInGroup:w,selectGroupIndex:f,onEditTitle:_,onTitleChange:S,onFinishEditTitle:k,onUseOtherGroup:x,customGroupEditTitleList:u}}}),Mf="",vf="",Bi={class:"custom-group-header"},Oi={class:"move-and-create"},Ii={class:"select-tip"},Fi={class:"select-count"},Di={class:"create-group"},$i={class:"custom-group-content"},Mi=["onClick"],vi={class:"extra"},Pi={class:"custom-group-list"},ji={class:"text"};function Ri(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),C=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),w=e.resolveComponent("a-modal"),_=e.resolveDirective("focus");return e.openBlock(),e.createBlock(w,{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",Bi,[e.createElementVNode("div",Oi,[e.createElementVNode("div",null,[e.createElementVNode("span",Ii,[e.createTextVNode(" 已选"),e.createElementVNode("span",Fi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,S)=>(e.openBlock(),e.createBlock(s,{key:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Di,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",$i,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,S)=>(e.openBlock(),e.createBlock(C,{key:S},{header:e.withCtx(()=>[t.customGroupEditTitleList[S]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,S),onBlur:h=>t.onFinishEditTitle(S),onPressEnter:h=>t.onFinishEditTitle(S)},null,8,["value","onChange","onBlur","onPressEnter"])),[[_]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(S),["prevent","stop"])},e.toDisplayString(k.title),9,Mi))]),extra:e.withCtx(()=>[e.createElementVNode("div",vi,[S===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),S!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(S),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,E)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":B=>h.checked=B,class:"custom-group",key:E},{default:e.withCtx(()=>[e.createElementVNode("span",ji,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Ui=oe(Li,[["render",Ri],["__scopeId","data-v-7e3049d2"]]);let _e=(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};var Gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo={},zi={get exports(){return Yo},set exports(t){Yo=t}};(function(t,o){(function(n,a){t.exports=a()})(Gi,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(zi);const Hi=Yo;de.extend(Hi);const Yi=e.defineComponent({name:"Condition",components:{CloseOutlined:Kt,DownOutlined:Ol,AppstoreAddOutlined:Lo,ASelect:$.Select,AInput:$.Input,ADatePicker:$.DatePicker,AButton:$.Button,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem,ASubMenu:$.SubMenu,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,ARadioGroup:$.RadioGroup,ARadio:$.Radio,AInputNumber:$.InputNumber,ASelectOption:$.SelectOption,MenuOutlined:Xn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var ct,dt,At,pt,Le,Qe,tt,ot,Re,ut,ft,mt,nt;const o=(ct=window==null?void 0:window.config)==null?void 0:ct.pageId,n=e.inject(me),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(gn),s=e.inject(Pe),d=e.ref(!1),l=de(),c=e.computed(()=>{var Y;const H=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:ne="",id:Z="",type:ce}=X;ce==="ecanRangePicker"?H.push({value:`${Z}-startTime`,label:`${ne||Z}-开始时间值`,keyName:`${ne||Z}-startTime`,id:Z},{value:`${Z}-endTime`,label:`${ne||Z}-结束时间值`,keyName:`${ne||Z}-endTime`,id:Z}):H.push({value:Z,label:`${ne||Z}`,keyName:`${ne||Z}`,id:Z})}),H}),p=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.dataViewId}),u=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},C=[{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"}],f=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:""}]),_=[{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"}],S=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(dt=t.data)==null?void 0:dt.fieldName,fieldType:(At=t.data)==null?void 0:At.fieldType,rule:(pt=t.data)==null?void 0:pt.rule,id:(Le=t.data)==null?void 0:Le.id,fieldValue:E(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(Re=t.data)==null?void 0:Re.indexCodeNum,dataType:((ut=t.data)==null?void 0:ut.dataType)||"",componentId:((ft=t.data)==null?void 0:ft.componentId)||"",useCurrentTime:!!((mt=t.data)!=null&&mt.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function E(){const{fieldType:H="",dataType:Y="",fieldValue:X=""}=t.data;if(H==="DATE"&&Y==="time")return X&&de(X);if(Y==="component"){const ne=e.unref(c).find(Z=>Z.keyName===X);return ne?ne.value:X}else return X}const B=e.ref(!1),I=e.computed(()=>h.value.fieldType==="DATE"),A=e.computed(()=>{const H=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ne=["controlList","sqlConditions","variableList","variableConditions"];if(X.includes(H)){let Z=[];for(const ce in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ce)&&!ne.includes(ce)){const xe=e.unref(n)[ce];Array.isArray(xe)&&(X.includes(ce)?Z=Z.concat(xe.filter(at=>at.show)):Z=Z.concat(xe))}Y=Z}else["leftAxisList","rightAxisList","indicators"].includes(H)&&(Y=e.unref(i));return Y.map(Z=>({...Z,label:Z.title||Z.label,value:Z.name}))}),{updateCondition:V,deleteCondition:N,addCondition:O}=e.inject(yn,{updateCondition:(H,Y,X)=>{},deleteCondition:(H,Y)=>{},addCondition:(H,Y,X)=>{}}),v=()=>{N(t.index,t.path)};e.watch(h,H=>{const Y=J.cloneDeep(H);H.fieldType==="DATE"&&H.dataType!=="component"&&H.fieldValue&&(Y.fieldValue=H.fieldValue.format(H.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,H=>{h.value.fieldValue="",h.value.useCurrentTime=H});const P=H=>{var G;const Y=e.unref(A).find(W=>W.value===H)||{},{name:X,genericType:ne,id:Z,label:ce,typeGuid:xe,indexCode:at,indexCodeNum:R}=Y;h.value={id:Z,fieldName:X,fieldType:ne,label:ce,rule:"",fieldValue:ne==="DATE"?null:void 0,targetSource:"",typeGuid:xe,indexCode:at,indexCodeNum:R,dataType:"",useCurrentTime:!1,keyValue:((G=e.unref(h))==null?void 0:G.keyValue)||_e()}},x=H=>{const Y=e.unref(c).find(X=>X.value===H)||{};e.unref(h).componentId=Y.id||""},F=e.computed(()=>{const H=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),H==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:H==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:H==="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"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),L=e.computed(()=>{let H="";const Y=e.unref(F).find(X=>X.value===e.unref(h).rule);return Y&&(H=Y.label),H}),j=e.computed(()=>{let H={fontSize:"12px"};return e.unref(L)||(H={...H,position:"absolute",right:"11px",top:"9px"}),H}),U=e.ref([]),y=async()=>{var H;if(!(e.unref(U).length>0))try{const Y=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:ne=[]}=Y.data;X&&(U.value=(H=ne==null?void 0:ne.slice(0,200))==null?void 0:H.map(Z=>({label:Z,value:Z})))}catch(Y){console.error(Y)}},b=H=>{e.unref(h).rule=H,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(H)&&y()},T=H=>{e.unref(h).dataType=H,e.unref(h).fieldValue=""},D=e.ref(),M=H=>{D.value=H,e.unref(h).fieldValue=(H==null?void 0:H.join(","))||""},z=H=>{const{keyPath:Y}=H;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var ne,Z,ce,xe,at,R,G,W;if(h.value.dataType=((ne=t.data)==null?void 0:ne.dataType)||"",h.value.componentId=((Z=t.data)==null?void 0:Z.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(xe=t.data)==null?void 0:xe.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((at=t.data)==null?void 0:at.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const re=e.unref(h).calcWays[0];if(re){const te=re.split("-");e.unref(f).expression=te[0],e.unref(f).around=te[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((R=t.data)==null?void 0:R.radioValue)||"";const re=e.unref(w).find(te=>{var le;return te.key===((le=t.data)==null?void 0:le.activeKey)});re&&Ve(re,t.data)}}else D.value=((W=(G=t.data)==null?void 0:G.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:H,fieldName:Y,rule:X}=h.value;H!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=H=>{if(e.unref(h).activeKey===H){e.unref(w)[H].radioValue=e.unref(h).radioValue,e.unref(w)[e.unref(h).activeKey]&&(e.unref(w)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(w)[H].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(w)[H].afterNum=e.unref(h).calcWays[0]));return}e.unref(w).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(H,Y)=>{m.value=!0;const X=H.target.value,ne=Y.type,Z=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),xe=Y.afterNum;Y.value=se(X,ne,Z,ce,xe)},ee=H=>{const Y=e.unref(h).activeKey;if(H!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const ne=e.unref(h).dateFormat,Z=e.unref(h).radioValue;let ce=0,xe=0;return Z==="1"?ce=Math.abs(e.unref(h).calcWays[0]):Z==="2"&&(xe=e.unref(h).calcWays[0]),se(Z,X,ne,ce,xe)},ae=(H,Y,X,ne)=>{if(m.value=!0,Y.radioValue===ne){const Z=H.target.value;X==="+"?Y.value=de().add(Z,Y.type).format(e.unref(h).dateFormat):Y.value=de().subtract(Z,Y.type).format(e.unref(h).dateFormat)}},ge=(H,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=H.radioValue,H.radioValue==="1"?e.unref(h).calcWays[0]="-"+H.beforeNum:H.radioValue==="2"?e.unref(h).calcWays[0]=H.afterNum:H.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":H.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),B.value=!1},ye=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,B.value=!1};function Ve(H,Y){const{radioValue:X="",calcWays:ne=[]}=Y;H.radioValue=X,ne!=null&&ne.length&&(X==="1"?H.beforeNum=Math.abs(ne[0]):X==="2"&&(H.afterNum=ne[0]))}function se(H,Y,X,ne,Z){if(H==="1")return de().subtract(ne,Y).format(X);if(H==="2")return de().add(Z,Y).format(X);if(H==="3"){if(Y==="years")return de().startOf("year").format(X);if(Y==="quarters")return de().startOf("quarter").format(X);if(Y==="months")return de().startOf("month").format(X);if(Y==="days")return de().format(X)}else if(H==="4"){if(Y==="years")return de().endOf("year").format(X);if(Y==="quarters")return de().endOf("quarter").format(X);if(Y==="months")return de().endOf("month").format(X)}return""}const Ce=(H,Y)=>Y.label.toLowerCase().indexOf(H.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:A,ruleOptions:F,onFieldChange:P,condition:h,valueOptions:U,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:M,fieldValues:D,onDelete:v,isDateType:I,formatList:C,tabDateList:w,compareList:_,menuRule:k,dateBtnLabel:L,downIconStyle:j,popoverVisible:B,dateRadioStyle:g,showTime:m,controlList:c,dataTypeList:S,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:z,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:ae,okDatePickConfig:ge,onChangeComponent:x,filterOption:Ce,okCustomConfig:ye,clickConditionMenu:({key:H})=>{O(t.path,t.index,H==="2"?"||":"&&")}}}}),Pf="",jf="",Wi={class:"condition"},qi=["title"],Ki={class:"rule"},Qi={class:"data-type"},Xi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Ji={class:"popover-content-wrap"},Zi={key:0,class:"use-current-time"},es={class:"tabFilterRadio"},ts={key:0},os={key:1},ns={style:{"margin-left":"10px"}},as={style:{"margin-left":"10px"}},rs={style:{position:"absolute",bottom:"10px"}},ls={style:{display:"flex"}},is={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),C=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),w=e.resolveComponent("a-input-number"),_=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),S=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),E=e.resolveComponent("appstore-add-outlined"),B=e.resolveComponent("a-popover"),I=e.resolveComponent("a-input"),A=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Wi,[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,(N,O)=>(e.openBlock(),e.createBlock(s,{key:O,value:N.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:N.label},e.toDisplayString(N.label),9,qi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Ki,[t.isDateType?(e.openBlock(),e.createBlock(g,{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,N=>(e.openBlock(),e.createBlock(c,{key:N.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value?"color: #1890FF;":"")},e.toDisplayString(N.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,O=>{var v;return e.openBlock(),e.createBlock(c,{key:O.value,disabled:O.value==="component"&&!((v=t.controlList)!=null&&v.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value&&t.condition.dataType===O.value?"color: #1890FF;":"")},e.toDisplayString(O.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value&&t.condition.dataType===O.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.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(u,{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",Qi,[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,(N,O)=>(e.openBlock(),e.createBlock(s,{key:O,value:N.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Xi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(C,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(C,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=N=>t.condition.fieldValue=N),format:t.condition.dateFormat},null,8,["value","format"]))],64)):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]=N=>t.condition.fieldValue=N),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(B,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=N=>t.popoverVisible=N),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Ji,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Zi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=N=>t.isUseCurrentTime=N)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(N,O)=>(e.openBlock(),e.createBlock(S,{key:O,tab:N.label},{default:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(k,{value:N.radioValue,"onUpdate:value":v=>N.radioValue=v,onChange:v=>t.changeRadioValue(v,N)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ts,"相对当前时间:"+e.toDisplayString(N.value),1)):(e.openBlock(),e.createElementBlock("div",os,"相对当前时间:"+e.toDisplayString(t.getFieldValue(O)),1)),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(w,{value:N.beforeNum,"onUpdate:value":v=>N.beforeNum=v,min:0,onBlur:v=>t.blurCompare(v,N,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ns,e.toDisplayString(N.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(w,{value:N.afterNum,"onUpdate:value":v=>N.afterNum=v,min:0,onBlur:v=>t.blurCompare(v,N,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",as,e.toDisplayString(N.afterLabel),1)]),_:2},1032,["style"]),N.beforeText?(e.openBlock(),e.createBlock(_,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),N.afterText?(e.openBlock(),e.createBlock(_,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=v=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:v=>t.okDatePickConfig(N,O)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(S,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=N=>t.customTabData.expression=N),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=N=>t.customTabData.unit=N),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=N=>t.customTabData.around=N)},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",is,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=N=>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[8]||(o[8]=N=>{t.popoverVisible=!0})},[e.createVNode(E)])]),_: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"])):(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=N=>t.condition.fieldValue=N),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(I,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=N=>t.condition.fieldValue=N)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(A,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const cs=oe(Yi,[["render",ss],["__scopeId","data-v-d10a7ca9"]]),ds=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:cs}}),Rf="",ps={key:0,class:"condition-list"},us={key:0,class:"condition-container"},fs={key:0,class:"condition-text"},ms={key:1,class:"condition-text"},hs={class:"conditions"};function ys(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",us,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",fs,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",ms,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",hs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const gs=oe(ds,[["render",ys],["__scopeId","data-v-553c1496"]]),bs=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:$.Select,AInput:$.Input,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=J.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),Uf="",ra=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Cs={class:"truncations"},ws={class:"rule"},ks={class:"field-value"},_s={class:"field-value"},xs=ra(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ss=ra(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ns=["onClick"];function As(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Cs,[(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",ws,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ks,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",_s,[xs,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ss]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ns)]))),128))])}const Ts=oe(bs,[["render",As],["__scopeId","data-v-f543c690"]]),he=(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},Es=t=>t.replace(/\\n/g,`
59
- `),bt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},la=(t,o)=>{var f;const n=J.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;sa(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const w of m){const _=Je((w==null?void 0:w.conditions)||[]);if(_!=null&&_.length){const k=_.filter(S=>ca(S,o)?(S==null?void 0:S.dataType)==="component":!1).map(S=>{const h=ca(S,o),E={};return S!=null&&S.dateFormat&&(E.format=S.dateFormat),{conditionKey:S.fieldName,conditionLabel:S.fieldName,conditionName:S.fieldName,conditionValueType:S.fieldType,id:h.id,keyName:S.fieldValue,rule:S.rule,notGlobal:!0,indexCode:S.indexCode,typeGuid:S.typeGuid,indexCodeNum:S.indexCodeNum,...E}});if(k!=null&&k.length)for(const S of k)g.find(h=>h.keyName===S.keyName)||g.push(S)}}const C=g.length;for(let w=0;w<C;w++){const _=g[w];if(_&&!((f=Object.keys(_))!=null&&f.length)||(_==null?void 0:_.conditionKey)==="parentCode")continue;const{id:k,keyName:S,prop:h,format:E,dataType:B="component",customValue:I}=_,A=ia(_);Wo({sqlCondition:A,renderUsedComponents:o,id:k,dateFormat:E,prop:h,keyName:S,dataType:B,customValue:I}),u.push(A)}for(let w=u.length-1;w>=0;w--){const _=u[w];_.globalCondition||Je(u).find(S=>S.alias===_.alias&&S.globalCondition)&&u.splice(w,1)}return u},Bt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Wo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function ia(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Vs=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function sa(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)sa(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=ia(n);Wo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Vs)delete n[p]}}function Wo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,m=n.find(S=>S.id===a),{value:g,format:C="YYYY-MM-DD",operate:f,type:w="",useCurrentTime:_}=m||{},k=r||C;if(he(w,"date")){let S;if(_?S=de():S=de(g),f&&g){const{mode:h,type:E,value:B}=f;if(B)switch(E){case"add":S=S.add(B,h);break;case"minus":S=S.subtract(B,h);break}}if(c&&p&&u)switch(u){case"add":S=S.add(c,p);break;case"minus":S=S.subtract(c,p);break}o.fieldValue=(S==null?void 0:S.format(k))||"",o.dateFormat=k}else if(w==="ecanRangePicker"){const{interval:S,intervalUnit:h,startTime:E,endTime:B}=m||{};let I=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(I=V[V.length-1])}if(!I)return;let A=null;if(_&&(I==="startTime"?A=de().subtract(S,h):I==="endTime"&&(A=de())),m[I]&&(A=de(m[I])),f){const{type:V,value:N,mode:O}=f;switch(V){case"add":A=A&&A.add(N,O);break;case"minus":A=A&&A.subtract(N,O)}}if(c&&p&&u){if(c==="rangeValue"){if(E&&B){const V=de(B).diff(de(E),p)+1;switch(u){case"add":A=A&&A.add(V,p);break;case"minus":A=A&&A.subtract(V,p)}}}else if(!isNaN(+c))switch(u){case"add":A=A&&A.add(c,p);break;case"minus":A=A&&A.subtract(c,p)}}if(A&&(o.fieldValue=A==null?void 0:A.format(k)),I==="rangeValue"&&E&&B){const V=Ls(k);V&&(o.fieldValue=de(B).diff(de(E),V)+1)}o.dateFormat=k}else{const S=g&&g.match(/\{(.+?)\}/g);S!=null&&S.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=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 ca(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}function Ls(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Bs=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:gs,TruncationList:Ts,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var x;return`添加过滤条件-${((x=t.item)==null?void 0:x.label)||""}`},r=e.inject(me),i=e.inject(Se),s=e.inject(Pe),d=e.computed(()=>{var x;return(x=e.unref(r))==null?void 0:x.dataSourceId}),l=e.inject(Ye),c=e.inject(zt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=x=>{var F;for(const L of x)(F=L.conditions)!=null&&F.length?g(L.conditions):L.keyValue=_e()};e.watch(m,x=>{var F,L,j,U;if(x){if(Array.isArray((F=t.item)==null?void 0:F.conditions)){const y=J.cloneDeep(((L=t.item)==null?void 0:L.conditions)||[]);g(y),p.value=y}Array.isArray((j=t.item)==null?void 0:j.truncations)?u.value=J.cloneDeep((U=t.item)==null?void 0:U.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!x)},{flush:"post"});let C=!1;const f=x=>{var F;C=!0,e.unref(p)==null||((F=e.unref(p))==null?void 0:F.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==x?p.value=[{join:x,conditions:[e.unref(p)[0],{keyValue:_e()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===x&&p.value[0].conditions.push({keyValue:_e()}))};e.provide(yn,{updateCondition(x,F,L){var y;C=!0;let j=e.unref(p);const U=L.split("-");if(U!=null&&U.length)for(const b of U)if(j[b])j=(y=j[b])==null?void 0:y.conditions;else break;Array.isArray(j)&&j[F]&&(j[F]=x)},deleteCondition(x,F){var U,y,b;C=!0;let L=e.unref(p);const j=F.split("-");if(j!=null&&j.length){for(const T of j)if(L[T])L=(U=L[T])==null?void 0:U.conditions;else break;if(Array.isArray(L)&&L[x])if(L.splice(x,1),L.length===1){if(j.length>0){const T=j.length-1,D=j[T],M=j.slice(0,T);let z=e.unref(p),K="";for(const Q of M)if(z[Q])K=(y=z[Q])==null?void 0:y.join,z=(b=z[Q])==null?void 0:b.conditions;else break;if(K===L[0].join){if(Array.isArray(L[0].conditions)){const Q=J.cloneDeep(L[0].conditions);z.splice(+D,1),z.splice(+D,0,...Q)}}else z[D]=L[0]}}else L.length===0&&(p.value=[])}},addCondition(x,F,L){var b,T;C=!0;let j=e.unref(p),U="";const y=x.split("-");if(y!=null&&y.length){for(const D of y)if(j[D])U=(b=j[D])==null?void 0:b.join,j=(T=j[D])==null?void 0:T.conditions;else break;if(U===L)j.splice(F+1,0,{keyValue:_e()});else{const D=J.cloneDeep(j[F]);j[F]={join:L,conditions:[D,{keyValue:_e()}]}}}}});const w=x=>{C=!0,u.value=x},_=e.computed(()=>{var F;const x=[];return(F=e.unref(s))==null||F.forEach(L=>{const{keyName:j="",id:U="",type:y}=L;y==="ecanRangePicker"?x.push({value:`${U}-startTime`,label:`${j||U}-开始时间值`,keyName:`${j||U}-startTime`},{value:`${U}-endTime`,label:`${j||U}-结束时间值`,keyName:`${j||U}-endTime`}):x.push({value:U,label:`${j||U}`,keyName:`${j||U}`})}),x}),k=()=>{var b,T,D;const x=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),F=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],L=Je(J.cloneDeep(F[t.index].conditions));F[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(F[t.index].truncations=e.unref(u));const j=Je(e.unref(p));for(const M of j)if(M.dataType==="component"&&M.fieldValue){const z=e.unref(_).find(K=>K.value===M.fieldValue);z&&(M.fieldValue=z.keyName)}const U=L.filter(M=>!j.find(z=>z.componentId===M.componentId)).filter(M=>!x.find(z=>z.id===M.componentId)),y=j.filter(M=>!L.find(z=>z.componentId===M.componentId));S(U,y),i({[t.type]:F,sqlConditions:la({...e.unref(r),[t.type]:F},e.unref(s))})};function S(x,F){var j;const L=x.map(U=>({...U,delete:!0})).concat(F.map(U=>({...U,add:!0})));for(const U of L){const y=e.unref(s).find(b=>b.id===U.componentId);if(y){const{type:b,id:T,events:D=[]}=y,M=Qt(b);if(U.add)D.find(z=>{var K;return z.on===M&&z.target===((K=e.unref(l))==null?void 0:K.id)&&z.emit==="refreshData"})||c({id:T,events:[...D,{on:M,target:(j=e.unref(l))==null?void 0:j.id,emit:"refreshData"}].reverse()});else if(U.delete){const z=D.findIndex(K=>{var Q;return K.on===M&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});z!==-1&&(D.splice(z,1),c({id:T,events:D}))}}}}const h=()=>{m.value=!0},E=()=>{p.value=[],m.value=!1},B=()=>{C&&k(),C=!1,E()},I=()=>{E()},A=e.inject(Me),V=e.unref(e.inject(ve)),N=(P=window==null?void 0:window.config)==null?void 0:P.pageId,O=e.ref([]);e.provide(gn,O);const v=async x=>{var F;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:L,indexCode:j}=x,U=await A.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:N,dataSourceId:e.unref(d),indexGuid:L,indexCode:j},{headers:{Authentication:V,operateContext:"ygt"}}),{success:y,data:b=[]}=U.data;y&&((F=b==null?void 0:b.dataViewColumns)!=null&&F.length)&&(O.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(L){console.error(L)}};return e.watch(()=>t.item,x=>{x&&m.value&&v(x)}),o({showModal:h}),{visible:m,onOk:B,onCancel:I,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:w,activeKey:n}}}),Gf="",Os={class:"header"},Is={class:"header"};function Fs(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",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(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{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(l,{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",Is,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{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 Ds=oe(Bs,[["render",Fs],["__scopeId","data-v-498bb1e7"]]),$s=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:$.Input,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(Se),i=e.ref(),s=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),zf="",Ms=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),vs={class:"config-name"},Ps=Ms(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function js(t,o,n,a,r,i){const s=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",vs,[Ps,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Rs=oe($s,[["render",js],["__scopeId","data-v-de6a1755"]]),Us=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(Se),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(zt),l=e.ref(),c=e.computed(()=>{var _;return(_=e.unref(i))==null?void 0:_.filter(k=>k.keyName!=="")});let p=[];const u=_=>{const{sortCpnts:k=[]}=_;p=J.cloneDeep(k),l.value=J.cloneDeep(k),n.value=!0},m=()=>{n.value=!1},g=()=>{var E,B;const _=Je(((E=e.unref(a))==null?void 0:E.controlList)||[]),k=p.filter(I=>!e.unref(l).includes(I)).filter(I=>!_.find(A=>A.id===I)),S=e.unref(l).filter(I=>!p.includes(I)).filter(I=>!_.find(A=>A.id===I)),h=k.map(I=>({componentId:I,delete:!0})).concat(S.map(I=>({componentId:I,add:!0})));for(const I of h){const A=e.unref(i).find(V=>V.id===I.componentId);if(A){const{type:V,id:N,events:O=[]}=A,v=Qt(V);if(I.add)O.find(P=>{var x;return P.on===v&&P.target===((x=e.unref(s))==null?void 0:x.id)&&P.emit==="refreshData"})||d({id:N,events:[...O,{on:v,target:(B=e.unref(s))==null?void 0:B.id,emit:"refreshData"}].reverse()});else if(I.delete){const P=O.findIndex(x=>{var F;return x.on===v&&x.target===((F=e.unref(s))==null?void 0:F.id)&&x.emit==="refreshData"});P!==-1&&(O.splice(P,1),d({id:N,events:O}))}}}},C=()=>{var k;g();const _=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];_[t.index].sortCpnts=l.value,r({[t.type]:_}),m()},f=()=>{m()},w=(_,k)=>{var S;return(S=k==null?void 0:k.keyName)==null?void 0:S.toLowerCase().includes(_==null?void 0:_.toLowerCase())};return o({showModal:u}),{visible:n,onOk:C,onCancel:f,idFilterOption:w,fieldName:l,usedComponentList:c}}}),Hf="",Gs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),zs={class:"sort-by-cpnt"},Hs=Gs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function Ys(t,o,n,a,r,i){const s=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",zs,[Hs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),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 Ws=oe(Us,[["render",Ys],["__scopeId","data-v-08af1ef8"]]),qs=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(Se),i=e.ref(),s=e.ref([]),d=(m,g)=>{const{dimByCount:C=""}=m;i.value=C,s.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var C;return(C=g==null?void 0:g.label)==null?void 0:C.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),Yf="",Ks=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),Qs={class:"dim-by-count"},Xs=Ks(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Js(t,o,n,a,r,i){const s=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",Qs,[Xs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Zs=oe(qs,[["render",Js],["__scopeId","data-v-e8608437"]]),qo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:qo(t,r.children)&&(n=qo(t,r.children)))}return n},ec=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:$.Row,ACol:$.Col,ATextarea:$.Textarea,APopover:$.Popover,AInputSearch:$.InputSearch,ATree:$.Tree,ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(me),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(V==null?void 0:V.filter(N=>{var O;return N.id!==((O=t.item)==null?void 0:O.id)}))||[]:V||[]}),u=e.computed(()=>s.value.filter(V=>!V.randomKey)),m=e.computed({get:()=>t.value||"",set:V=>{o("update:value",V),o("change",V)}}),g=e.ref("1"),C=e.ref(""),f=V=>{const N=document.getElementById("calTextArea");let O=m.value;if(document.selection){const v=document.selection.createRange();v.text=V}else if(typeof N.selectionStart=="number"&&typeof N.selectionEnd=="number"){const v=N.selectionStart,P=N.selectionEnd;let x=v;O=O.substring(0,v)+V+O.substring(P,O.length),x+=V.length,N.selectionStart=N.selectionEnd=x}else O+=V;m.value=O},w=["+","-","*","/","(",")"],_=(V,N)=>{let O="";switch(N){case"name":{O="${"+V+"}";break}case"function":{O=V+"()";break}default:O=V}f(O)},k=[],S=e.ref([]),h=e.ref(!0),E=e.ref([]),B=V=>{var N;for(const O of V)(N=O==null?void 0:O.children)!=null&&N.length?B(O.children):k.push({key:O.key,title:O.title})},I=async()=>{try{const V=await n.get(`${Be}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:N,data:O=[]}=V.data;N&&(O!=null&&O.length)&&(B(O),E.value=O)}catch(V){console.error(V)}},A=V=>{S.value=V,h.value=!1};return e.watch(C,V=>{const N=k.map(O=>O.title.indexOf(V)>-1?qo(O.key,E.value):null).filter((O,v,P)=>O&&P.indexOf(O)===v);S.value=N,C.value=V,h.value=!0}),e.onMounted(()=>{I()}),{fieldList:p,varList:u,myValue:m,calculMethods:w,funcDescsData:E,searchFuncValue:C,expandedKeys:S,autoExpandParent:h,activeKey:g,selectedElem:_,onExpand:A}}}),Wf="",qf="",tc={class:"formula-calculation"},oc={class:"field-area"},nc={style:{"text-align":"center",padding:"10px 0"}},ac=["onClick"],rc=["onClick"],lc={class:"cal_right_bottom"},ic={class:"cal_fu"},sc=["onClick"],cc={class:"function-wrap"},dc={class:"wrap-search"},pc={class:"tree-box"},uc={key:0},fc={style:{color:"#f50"}},mc={key:1},hc=["onClick"],yc={class:"cal_a"};function gc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),C=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",tc,[e.createVNode(C,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",oc,[e.createElementVNode("div",nc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:_=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,ac))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:_=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,rc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",lc,[e.createElementVNode("ul",ic,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:_=>t.selectedElem(f,"symbol"),key:w},e.toDisplayString(f),9,sc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",cc,[e.createElementVNode("div",dc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",pc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:w})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",uc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",fc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",mc,e.toDisplayString(f),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:_=>t.selectedElem(f,"function")},"插入",8,hc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",yc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const bc=oe(ec,[["render",gc],["__scopeId","data-v-ba051d9b"]]),Cc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:bc,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:ti},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(Pe),a=e.inject(me),r=e.inject(Se),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let x=[];for(const F of P)Object.prototype.hasOwnProperty.call(e.unref(a),F)&&(x=x.concat(e.unref(a)[F]));return x}),l={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},m=e.ref({}),g=e.ref(),C=e.ref(!1),f=e.ref();e.watch(C,P=>{if(P)if(t.mode==="edit"){const{label:x,calcType:F,formula:L,builtInValueSource:j,builtInFormula:U,builtInCalcWay:y}=t.item;if(f.value={label:x,calcType:F,formula:L,builtInValueSource:j,builtInFormula:U,builtInCalcWay:y},U==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=J.cloneDeep(p),m.value=J.cloneDeep(u));else f.value=J.cloneDeep(p),m.value=J.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let w=!1;const _=()=>{w=!0},k=P=>{const x=e.unref(i).find(F=>F.id===P);x&&(f.value.builtInCalcWay=x.keyName),w=!0},S=()=>{var j;const P=((j=e.unref(a)[t.type])==null?void 0:j.slice())||[],{label:x,builtInFormula:F}=e.unref(f)||{},L={};if(F==="DATE_OFFSET"&&(L.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const U=_e();P.push({...e.unref(f),...L,id:U,show:!0,name:x})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(f),...L,name:x});r({[t.type]:P})},h=()=>{C.value=!0},E=()=>{C.value=!1},B=async(P,x)=>{if(x==="")return Promise.reject(new Error("请输入指标名"));{const F=e.unref(d).find(L=>L.label===x);return F?F.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},I=e.computed(()=>{let P={label:[{required:!0,validator:B,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),A=()=>{g.value.validate().then(()=>{w&&S(),w=!1,E()})},V=()=>{g.value.clearValidate(),E()},N=()=>{w=!0,e.unref(f).builtInCalcWay=""},O=e.computed(()=>{let P="";const x=e.unref(f).builtInCalcWay,F=e.unref(f).builtInValueSource;if(!F||!x)return P;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{x==="ASC"?P="【"+F+"】由小到大在所有值中的排名":P="【"+F+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
60
- `,x==="ASC"?P=P+"【"+F+"】由小到大的组内的排名":P=P+"【"+F+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let L="";switch(x){case"SUM":{L="求和";break}case"AVG":{L="求平均值";break}case"MIN":{L="求最小值";break}case"MAX":{L="求最大值";break}}P="将所有【"+F+"】"+L;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let L="";switch(P=`所有【】的
61
- `,x){case"SUM":{L="求和";break}case"AVG":{L="求平均值";break}case"MIN":{L="求最小值";break}case"MAX":{L="求最大值";break}}P=P+"将所有【"+F+"】"+L;break}}return P}),v=(P,x)=>x.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return o({showModal:h}),{visible:C,onCancel:V,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:A,onChange:_,formRules:I,accessLogic:O,formRef:g,onChangeBuiltInFormula:N,componentList:i,onChangeComponent:k,filterOption:v,offsetConfig:m}}}),Kf="",Qf="",wc={key:0,class:"accesstip"},kc={style:{display:"flex","align-items":"center"}};function _c(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),C=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),w=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(w,{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(f,{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(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=_=>t.formState.label=_),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]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{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]=_=>t.formState.formula=_),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","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]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{value:"DATE_OFFSET"},{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]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:_.label,disabled:t.mode==="edit"&&t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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]=_=>t.formState.builtInCalcWay=_),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(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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",wc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],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]=_=>t.formState.builtInValueSource=_),"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),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=_=>t.offsetConfig.value=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=_=>t.offsetConfig.unit=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=_=>t.offsetConfig.around=_),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(C,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const xc=oe(Cc,[["render",_c],["__scopeId","data-v-33575cd9"]]),Sc=e.defineComponent({name:"DataConfigCard",directives:{focus:aa},components:{CalculationModal:xc,FilterModal:Ds,CustomGroupModal:Ui,SettingOutlined:ci,DeleteOutlined:Yn,CopyOutlined:kl,InfoCircleOutlined:$l,CustomSortModal:Vi,PlusOutlined:Xl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:Tt,ConfigName:Rs,SortByCpnt:Ws,DimByCount:Zs},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(me),a=e.inject(Se),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(R={})=>{var q;const{type:G}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(R.scope)?i.includes(G)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(R.scope)&&s.includes(G)&&(W=!0),G==="dimensionList"){const ie=((q=e.unref(n)[G])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(R="{}")=>{var G,W;try{const q=JSON.parse(R);if(!c(q))return;const ie=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!he(e.unref(ce).type,["list","circulate","scatter"])||e.unref(p))&&ie.forEach(te=>{te.show=!1}),g(ie,q),q.randomKey=_e(),ie.push(q);const re={};if(["IDX","BUILT_IN_IDX"].includes(q.scope)){let te=[];const le=sessionStorage.getItem("indicator-variates");if(le){const ue=JSON.parse(le);if(ue!=null&&ue.length){te=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const pe of ue)te.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:_e()})}}re.variableList=te,re.variableConditions=Bt(te,r)}a({[t.type]:ie,...re}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(R="{}")=>{var G;try{const{cardItem:W,type:q,index:ie}=JSON.parse(R);if(!c(W)||q===t.type)return;const re=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];g(re,W),re.push(W);const te=e.unref(n)[q].slice()||[];te.splice(ie,1),a({[t.type]:re,[q]:te})}catch(W){console.error(W)}};function g(R,G){const W=[];if(R.forEach(q=>{q.label.includes(G.label)&&W.push(q.label.split(G.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){G.label=G.label+q;break}}}const C=(R,G)=>{var ie,re;const W=(ie=R.target)==null?void 0:ie.checked,q=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!he(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(te=>{te.show=!1}),q[G].show=W,a({[t.type]:q})},f=R=>{var W;const G=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];G.splice(R,1),a({[t.type]:G})},w=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const R=sessionStorage.getItem("indicator-list-item"),G=sessionStorage.getItem("indicator-card-item");R?u(R):G&&m(G)},k=R=>{var le,ue;const{newIndex:G,oldIndex:W,from:q,to:ie}=R,re=q.id,te=ie.id;if(G>=0&&W>=0){if(re===te){const pe=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=pe.splice(W,1)[0];He&&(pe.splice(G,0,He),a({[t.type]:pe}))}else if(t.type===te){const pe=((ue=e.unref(n)[te])==null?void 0:ue.slice())||[];if(pe!=null&&pe.length){const He=pe.splice(pe.length-1,1)[0];He&&(pe.splice(G,0,He),a({[t.type]:pe}))}}}},S=(R,G)=>{const W=R.oldIndex,q=G[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(n)[t.type]||[]),E=e.ref([]);let B=!1;e.watch(()=>e.unref(h).length,R=>{E.value=new Array(R).fill(!1)},{flush:"post",immediate:!0});const I=R=>{var W,q,ie;const G=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=G[R])!=null&&q.randomKey){const re=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let te=re.length-1;te>=0;te--)re[te].randomKey===G[R].randomKey&&re.splice(te,1);a({variableConditions:Bt(re,r),variableList:re})}G.splice(R,1),a({[t.type]:G})},A=R=>{E.value[R]=!0},V=()=>{B=!0},N=(R,G,W)=>{var q,ie,re,te;if(E.value[G]=!1,B){const le=(q=R.target)==null?void 0:q.value,ue=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],pe=ue.filter(fe=>{var we;return(we=fe==null?void 0:fe.formula)==null?void 0:we.includes(W)}).map(fe=>fe.id),He=ue.filter(fe=>{var we;return(we=fe==null?void 0:fe.builtInValueSource)==null?void 0:we.includes(W)}).map(fe=>fe.id);if(pe!=null&&pe.length)for(const fe of pe){const we=ue.find(ht=>ht.id===fe);we.formula=we.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const fe of He){const we=ue.find(ht=>ht.id===fe);we.builtInValueSource=we.builtInValueSource.replaceAll(W,le)}if(ue[G].label=le,(re=ue[G])!=null&&re.randomKey){const fe=((te=e.unref(n))==null?void 0:te.variableList)||[],we=fe.filter(ht=>ht.randomKey===ue[G].randomKey);we!=null&&we.length&&we.forEach(ht=>{ht.label=le}),a({variableConditions:Bt(fe,r),variableList:fe})}a({[t.type]:ue})}B=!1},O="DEFAULT",v=e.computed(()=>{const R=[],{scope:G,label:W}=e.unref(l)||{};let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(G)&&(q=q.filter(le=>le.label===W)),G==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=J.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,R.push(le)}const{leftAxisList:ie=[],rightAxisList:re=[],indicators:te=[]}=e.unref(n)||{};return[...q,...R,...ie,...re,...te]}),P=(R={},G,W="ASC")=>{var ue;const{label:q,name:ie,id:re,defaultCode:te}=R,le=((ue=e.unref(n)[t.type])==null?void 0:ue.slice())||[];re===O?delete le[G].sort:le[G].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:te},a({[t.type]:le})},x=(R={},G="ASC")=>{const q={ASC:"升序",DESC:"降序"}[G],{sort:ie}=R,{label:re,order:te}=ie||{};return re&&te===G?`${q}(${re})`:q},F=e.ref(),L=e.ref(),j=e.ref(),U=e.ref(),y=(R={},G)=>{var W;F.value=R,L.value=G,(W=e.unref(j))==null||W.showModal(R)},b=R=>"排序"+(R!=null&&R.sort?"(已配置)":""),T=(R={},G)=>{var W;F.value=R,L.value=G,(W=e.unref(U))==null||W.showModal()},D=R=>"自定义分组"+((R==null?void 0:R.customGroup)!=null?"(已配置)":""),M=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],z=[{name:"是",value:1},{name:"否",value:0}],K=(R,G)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[G].aggregate=R,a({[t.type]:W})},Q=(R,G)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[G].distinct=R,a({[t.type]:W})},ee=(R,G)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[G].dateFormat=R,a({[t.type]:W})},ae=(R="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[R]})`,ge=R=>`是否去重(${{0:"否",1:"是"}[R]||"否"})`,ye=(R={})=>{var G;return"过滤"+(R!=null&&R.conditions&&((G=R==null?void 0:R.conditions)==null?void 0:G.length)>0?"(已配置)":"")},Ve=e.ref(),se=e.ref(),Ce=e.ref(),et=e.ref(),mo=(R={},G)=>{F.value=R,L.value=G,e.unref(Ve).showModal()},ct=(R={},G)=>{F.value=R,L.value=G,e.unref(se).showModal(R)},dt=(R={},G)=>{F.value=R,L.value=G,e.unref(Ce).showModal(R)},At=(R={},G)=>{F.value=R,L.value=G,e.unref(et).showModal(R,e.unref(Y))},pt=e.ref(),Le=e.ref("add"),Qe=(R,G,W)=>{var q;Le.value=R,R==="edit"&&(F.value=G,L.value=W),(q=e.unref(pt))==null||q.showModal()},tt=e.inject(Me),ot=e.unref(e.inject(ve)),Re=e.ref([]),ut=e.computed(()=>e.unref(n)[t.type]||{});e.watch(n,()=>{var R;he(e.unref(ce).type,"scatter")&&((R=e.unref(n))!=null&&R.indicators)&&(Re.value=e.unref(n).indicators.map(G=>({label:G.label,value:G.label})))});const ft=async()=>{if(!he(e.unref(ce).type,"scatter"))try{const R=await tt.post(`${Be}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:G,data:W=[]}=R.data;G&&(e.unref(n).selectFieldOptions=W||[],Re.value=W)}catch(R){console.error(R)}},mt=(R,G)=>{const W=e.unref(n)[t.type]||{};W[G]=R,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],H=e.ref({}),Y=e.ref([]),X=async(R,G)=>{var q;const{name:W}=G;if(!nt.includes(t.type)&&R&&bt(G,"indexCode")){const ie=await tt.post(`${Be}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:G.id,indexCode:G.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:re,data:te}=ie.data;re&&te&&(Y.value=(te==null?void 0:te.dataViewColumns)||[],H.value[W]={name:te.name,code:te.indexCode})}},ne=R=>{l.value=R},Z=R=>{const G=document.createElement("input");document.body.appendChild(G),G.setAttribute("value",R),G.select(),document.execCommand("copy"),document.body.removeChild(G),$.message.success("复制成功")},ce=e.inject(Ye),xe=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),at=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?Re.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ft())}),{onCheckboxChange:C,onDropEnd:f,onDragItemEnd:w,onDragItemAdd:_,onDragItemSort:k,onDragItemStart:S,cardItemList:h,onDelete:I,onEdit:A,onCommitLabelChange:N,sortList:v,onSort:P,handleSortTitle:x,showCustomSortModal:y,customSortModalRef:j,currentItem:F,currentIndex:L,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:U,showCustomGroupModal:T,editLabelList:E,onLabelChange:V,aggregateList:M,distinctList:z,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:ae,handleDistinctTitle:ge,onShowCalculationModal:Qe,handleFilterTitle:ye,filterModalRef:Ve,configNameRef:se,sortByCpntRef:Ce,dimByCountRef:et,showFilterModal:mo,calculationModalRef:pt,calculationModalMode:Le,formatList:o,fieldOptions:Re,fieldData:ut,onFieldChange:mt,onVisibleChange:X,onClickSetting:ne,copyDataViewName:Z,dataViewMap:H,isShowConfigName:xe,showConfigNameModal:ct,dimensionType:nt,isShowSortByCpnt:at,showSortByCpntModal:dt,dataSelectIndicators:p,showDimByCountModal:At,selectedComponent:ce}}}),Xf="",Jf="",rt=t=>(e.pushScopeId("data-v-10465d01"),t=t(),e.popScopeId(),t),Nc={class:"title"},Ac={class:"title-text"},Tc={class:"field-wrap"},Ec={class:"field-item"},Vc=rt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Lc={class:"field-item"},Bc=rt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Oc={key:0,class:"field-item"},Ic=rt(()=>e.createElementVNode("div",{class:"item-label",style:{width:"20px"}},null,-1)),Fc={class:"title"},Dc={class:"title-text"},$c=rt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Mc=rt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),vc={class:"card-item-wrap"},Pc={class:"card-item-inner"},jc=["onClick"],Rc=["onClick"],Uc=["onClick"],Gc={style:{display:"flex","align-items":"center"}},zc=["title"],Hc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Yc={style:{display:"flex","align-items":"center"}},Wc=["title"],qc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Kc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-checkbox"),l=e.resolveComponent("a-card"),c=e.resolveComponent("info-circle-outlined"),p=e.resolveComponent("a-popover"),u=e.resolveComponent("plus-outlined"),m=e.resolveComponent("a-input"),g=e.resolveComponent("setting-outlined"),C=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-menu-divider"),w=e.resolveComponent("a-sub-menu"),_=e.resolveComponent("copy-outlined"),k=e.resolveComponent("a-menu"),S=e.resolveComponent("a-dropdown"),h=e.resolveComponent("delete-outlined"),E=e.resolveComponent("draggable"),B=e.resolveComponent("custom-sort-modal"),I=e.resolveComponent("custom-group-modal"),A=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),N=e.resolveComponent("sort-by-cpnt"),O=e.resolveComponent("dim-by-count"),v=e.resolveComponent("calculation-modal"),P=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(l,{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",Nc,[e.createElementVNode("div",Ac,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Tc,[e.createElementVNode("div",Ec,[Vc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=x=>t.onFieldChange(x,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Lc,[Bc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=x=>t.onFieldChange(x,"valueField"))},null,8,["value","options"])]),t.selectedComponent.type==="ecanSelect"?(e.openBlock(),e.createElementBlock("div",Oc,[Ic,e.createVNode(d,{checked:t.fieldData.hasAllOption,"onUpdate:checked":o[2]||(o[2]=x=>t.fieldData.hasAllOption=x)},{default:e.withCtx(()=>[e.createTextVNode(" 显示【全部】选项 ")]),_:1},8,["checked"])])):e.createCommentVNode("",!0)])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(l,{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",Fc,[e.createElementVNode("div",Dc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(p,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[$c]),default:e.withCtx(()=>[e.createVNode(c,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[3]||(o[3]=e.withModifiers(x=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(u,{class:"add-calculation-icon"}),Mc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(E,{modelValue:t.cardItemList,"onUpdate:modelValue":o[4]||(o[4]=x=>t.cardItemList=x),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[5]||(o[5]=x=>t.onDragItemStart(x,t.cardItemList))},{item:e.withCtx(({element:x,index:F})=>[e.createElementVNode("div",vc,[e.createVNode(d,{class:"card-item",checked:x.show,onChange:L=>t.onCheckboxChange(L,F)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[!t.editLabelList[F]&&x.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(L=>t.onEdit(F),["prevent","stop"])},e.toDisplayString(x.label),9,jc)):e.createCommentVNode("",!0),!t.editLabelList[F]&&!x.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(L=>t.onEdit(F),["prevent","stop"])}," 请点击填入名字 ",8,Rc)):e.createCommentVNode("",!0),t.editLabelList[F]?e.withDirectives((e.openBlock(),e.createBlock(m,{key:2,"default-value":x.label,size:"small",onBlur:L=>t.onCommitLabelChange(L,F,x.label),onPressEnter:L=>t.onCommitLabelChange(L,F,x.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(x.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(L=>t.onShowCalculationModal("edit",x,F),["prevent","stop"])}," fx ",8,Uc)):e.createCommentVNode("",!0),e.createVNode(S,{trigger:["click"],onVisibleChange:L=>t.onVisibleChange(L,x)},{overlay:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{onClick:L=>t.showCustomSortModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(C,{onClick:L=>t.showCustomGroupModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(f),x.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,L=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:L.value,onClick:j=>t.onDateFormatChange(L.value,F)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(x.dateFormat===L.value||!x.dateFormat&&L.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(L.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(C,{onClick:L=>t.showFilterModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(f),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(x.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,L=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:L.value,onClick:j=>t.onAggregateChange(L.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(C,{onClick:L=>t.showConfigNameModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(C,{onClick:L=>t.showSortByCpntModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),x.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(C,{onClick:L=>t.showDimByCountModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(w,{title:t.handleDistinctTitle(x.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,L=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:L.value,onClick:j=>t.onDistinctChange(L.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[x.name]?(e.openBlock(),e.createBlock(C,{key:0,onClick:L=>t.copyDataViewName(t.dataViewMap[x.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Gc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[x.name].name},[Hc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[x.name].name),1)],8,zc),e.createVNode(_,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[x.name]?(e.openBlock(),e.createBlock(C,{key:1,onClick:L=>t.copyDataViewName(t.dataViewMap[x.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Yc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[x.name].code},[qc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[x.name].code),1)],8,Wc),e.createVNode(_,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(g,{class:"setting-icon",onClick:L=>t.onClickSetting(x)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(h,{class:"delete-icon",onClick:e.withModifiers(L=>t.onDelete(F),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(B,{item:t.currentItem,index:t.currentIndex,type:t.type,sortList:t.sortList,ref:"customSortModalRef"},null,8,["item","index","type","sortList"]),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(A,{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(N,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(O,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(v,{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 Qc=oe(Sc,[["render",Kc],["__scopeId","data-v-10465d01"]]),Xc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},Jc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Qc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(Se),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var w,_;const l=J.cloneDeep((w=e.unref(t))==null?void 0:w.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["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"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"],scatter:["classificationList","indicators","formFields"]},u="ecan";let m=e.unref(o);if(m.startsWith(u)){const k=u.length;m=((_=m.slice(k,k+1))==null?void 0:_.toLowerCase())+m.slice(k+1)}const g=p[m],C=Xc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const S=g[k];if(!S)break;r.push({...C[S],type:S})}for(const k of c)s(l,k)&&!g.find(S=>S===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Zf="",em="",Zc={class:"data-group"};function ed(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const td=oe(Jc,[["render",ed],["__scopeId","data-v-e486502c"]]),od=[{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"]}],nd={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"}},ad=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:$.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function rd(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const ld=oe(ad,[["render",rd]]),id=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:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),i=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?o("change",u):o("change",`${u}${m}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function sd(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{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},u)=>(e.openBlock(),e.createBlock(s,{key:u,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},u)=>(e.openBlock(),e.createBlock(s,{key:u,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 da=oe(id,[["render",sd]]),cd=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:$.RadioGroup,ARadioButton:$.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function dd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const pd=oe(cd,[["render",dd]]),ud=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function fd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const md=oe(ud,[["render",fd]]),hd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:$.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function yd(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const gd=oe(hd,[["render",yd]]);var Ne="top",Ie="bottom",Fe="right",Ae="left",Ko="auto",Ot=[Ne,Ie,Fe,Ae],Ct="start",It="end",bd="clippingParents",pa="viewport",Ft="popper",Cd="reference",ua=Ot.reduce(function(t,o){return t.concat([o+"-"+Ct,o+"-"+It])},[]),fa=[].concat(Ot,[Ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ct,o+"-"+It])},[]),wd="beforeRead",kd="read",_d="afterRead",xd="beforeMain",Sd="main",Nd="afterMain",Ad="beforeWrite",Td="write",Ed="afterWrite",Vd=[wd,kd,_d,xd,Sd,Nd,Ad,Td,Ed];function Ue(t){return t?(t.nodeName||"").toLowerCase():null}function Ee(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function lt(t){var o=Ee(t).Element;return t instanceof o||t instanceof Element}function De(t){var o=Ee(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Qo(t){if(typeof ShadowRoot>"u")return!1;var o=Ee(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ld(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!De(i)||!Ue(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Bd(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],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!De(r)||!Ue(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Od={name:"applyStyles",enabled:!0,phase:"write",fn:Ld,effect:Bd,requires:["computeStyles"]};function Ge(t){return t.split("-")[0]}var it=Math.max,Xt=Math.min,wt=Math.round;function Xo(){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 ma(){return!/^((?!chrome|android).)*safari/i.test(Xo())}function kt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&De(t)&&(r=t.offsetWidth>0&&wt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&wt(a.height)/t.offsetHeight||1);var s=lt(t)?Ee(t):window,d=s.visualViewport,l=!ma()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:c+u,bottom:p+m,left:c,x:c,y:p}}function Jo(t){var o=kt(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 ha(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Qo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Ee(t).getComputedStyle(t)}function Id(t){return["table","td","th"].indexOf(Ue(t))>=0}function Ze(t){return((lt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Ue(t)==="html"?t:t.assignedSlot||t.parentNode||(Qo(t)?t.host:null)||Ze(t)}function ya(t){return!De(t)||qe(t).position==="fixed"?null:t.offsetParent}function Fd(t){var o=/firefox/i.test(Xo()),n=/Trident/i.test(Xo());if(n&&De(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Qo(r)&&(r=r.host);De(r)&&["html","body"].indexOf(Ue(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Dt(t){for(var o=Ee(t),n=ya(t);n&&Id(n)&&qe(n).position==="static";)n=ya(n);return n&&(Ue(n)==="html"||Ue(n)==="body"&&qe(n).position==="static")?o:n||Fd(t)||o}function Zo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $t(t,o,n){return it(t,Xt(o,n))}function Dd(t,o,n){var a=$t(t,o,n);return a>n?n:a}function ga(){return{top:0,right:0,bottom:0,left:0}}function ba(t){return Object.assign({},ga(),t)}function Ca(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var $d=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ba(typeof o!="number"?o:Ca(o,Ot))};function Md(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ge(n.placement),l=Zo(d),c=[Ae,Fe].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=$d(r.padding,n),m=Jo(i),g=l==="y"?Ne:Ae,C=l==="y"?Ie:Fe,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],w=s[l]-n.rects.reference[l],_=Dt(i),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=f/2-w/2,h=u[g],E=k-m[p]-u[C],B=k/2-m[p]/2+S,I=$t(h,B,E),A=l;n.modifiersData[a]=(o={},o[A]=I,o.centerOffset=I-B,o)}}function vd(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)||ha(o.elements.popper,r)&&(o.elements.arrow=r))}const Pd={name:"arrow",enabled:!0,phase:"main",fn:Md,effect:vd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _t(t){return t.split("-")[1]}var jd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Rd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:wt(n*r)/r||0,y:wt(a*r)/r||0}}function wa(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=s.x,g=m===void 0?0:m,C=s.y,f=C===void 0?0:C,w=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=w.x,f=w.y;var _=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),S=Ae,h=Ne,E=window;if(c){var B=Dt(n),I="clientHeight",A="clientWidth";if(B===Ee(n)&&(B=Ze(n),qe(B).position!=="static"&&d==="absolute"&&(I="scrollHeight",A="scrollWidth")),B=B,r===Ne||(r===Ae||r===Fe)&&i===It){h=Ie;var V=u&&B===E&&E.visualViewport?E.visualViewport.height:B[I];f-=V-a.height,f*=l?1:-1}if(r===Ae||(r===Ne||r===Ie)&&i===It){S=Fe;var N=u&&B===E&&E.visualViewport?E.visualViewport.width:B[A];g-=N-a.width,g*=l?1:-1}}var O=Object.assign({position:d},c&&jd),v=p===!0?Rd({x:g,y:f},Ee(n)):{x:g,y:f};if(g=v.x,f=v.y,l){var P;return Object.assign({},O,(P={},P[h]=k?"0":"",P[S]=_?"0":"",P.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",P))}return Object.assign({},O,(o={},o[h]=k?f+"px":"",o[S]=_?g+"px":"",o.transform="",o))}function Ud(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ge(o.placement),variation:_t(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,wa(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:s,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,wa(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Gd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ud,data:{}};var Zt={passive:!0};function zd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Ee(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Hd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zd,data:{}};var Yd={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return Yd[o]})}var Wd={start:"end",end:"start"};function ka(t){return t.replace(/start|end/g,function(o){return Wd[o]})}function en(t){var o=Ee(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function tn(t){return kt(Ze(t)).left+en(t).scrollLeft}function qd(t,o){var n=Ee(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=ma();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+tn(t),y:l}}function Kd(t){var o,n=Ze(t),a=en(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=it(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=it(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+tn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=it(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function on(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function _a(t){return["html","body","#document"].indexOf(Ue(t))>=0?t.ownerDocument.body:De(t)&&on(t)?t:_a(Jt(t))}function Mt(t,o){var n;o===void 0&&(o=[]);var a=_a(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Ee(a),s=r?[i].concat(i.visualViewport||[],on(a)?a:[]):a,d=o.concat(s);return r?d:d.concat(Mt(Jt(s)))}function nn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Qd(t,o){var n=kt(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 xa(t,o,n){return o===pa?nn(qd(t,n)):lt(o)?Qd(o,n):nn(Kd(Ze(t)))}function Xd(t){var o=Mt(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&De(t)?Dt(t):t;return lt(a)?o.filter(function(r){return lt(r)&&ha(r,a)&&Ue(r)!=="body"}):[]}function Jd(t,o,n,a){var r=o==="clippingParents"?Xd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=xa(t,c,a);return l.top=it(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=it(p.left,l.left),l},xa(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Sa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ge(a):null,i=a?_t(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Ne:l={x:s,y:o.y-n.height};break;case Ie:l={x:s,y:o.y+o.height};break;case Fe:l={x:o.x+o.width,y:d};break;case Ae:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Zo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case Ct:l[c]=l[c]-(o[p]/2-n[p]/2);break;case It:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function vt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?bd:d,c=n.rootBoundary,p=c===void 0?pa:c,u=n.elementContext,m=u===void 0?Ft:u,g=n.altBoundary,C=g===void 0?!1:g,f=n.padding,w=f===void 0?0:f,_=ba(typeof w!="number"?w:Ca(w,Ot)),k=m===Ft?Cd:Ft,S=t.rects.popper,h=t.elements[C?k:m],E=Jd(lt(h)?h:h.contextElement||Ze(t.elements.popper),l,p,s),B=kt(t.elements.reference),I=Sa({reference:B,element:S,strategy:"absolute",placement:r}),A=nn(Object.assign({},S,I)),V=m===Ft?A:B,N={top:E.top-V.top+_.top,bottom:V.bottom-E.bottom+_.bottom,left:E.left-V.left+_.left,right:V.right-E.right+_.right},O=t.modifiersData.offset;if(m===Ft&&O){var v=O[r];Object.keys(N).forEach(function(P){var x=[Fe,Ie].indexOf(P)>=0?1:-1,F=[Ne,Ie].indexOf(P)>=0?"y":"x";N[P]+=v[F]*x})}return N}function Zd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?fa:l,p=_t(a),u=p?d?ua:ua.filter(function(C){return _t(C)===p}):Ot,m=u.filter(function(C){return c.indexOf(C)>=0});m.length===0&&(m=u);var g=m.reduce(function(C,f){return C[f]=vt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ge(f)],C},{});return Object.keys(g).sort(function(C,f){return g[C]-g[f]})}function ep(t){if(Ge(t)===Ko)return[];var o=eo(t);return[ka(t),o,ka(o)]}function tp(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,C=g===void 0?!0:g,f=n.allowedAutoPlacements,w=o.options.placement,_=Ge(w),k=_===w,S=l||(k||!C?[eo(w)]:ep(w)),h=[w].concat(S).reduce(function(z,K){return z.concat(Ge(K)===Ko?Zd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:C,allowedAutoPlacements:f}):K)},[]),E=o.rects.reference,B=o.rects.popper,I=new Map,A=!0,V=h[0],N=0;N<h.length;N++){var O=h[N],v=Ge(O),P=_t(O)===Ct,x=[Ne,Ie].indexOf(v)>=0,F=x?"width":"height",L=vt(o,{placement:O,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),j=x?P?Fe:Ae:P?Ie:Ne;E[F]>B[F]&&(j=eo(j));var U=eo(j),y=[];if(i&&y.push(L[v]<=0),d&&y.push(L[j]<=0,L[U]<=0),y.every(function(z){return z})){V=O,A=!1;break}I.set(O,y)}if(A)for(var b=C?3:1,T=function(K){var Q=h.find(function(ee){var ae=I.get(ee);if(ae)return ae.slice(0,K).every(function(ge){return ge})});if(Q)return V=Q,"break"},D=b;D>0;D--){var M=T(D);if(M==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const op={name:"flip",enabled:!0,phase:"main",fn:tp,requiresIfExists:["offset"],data:{_skip:!1}};function Na(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 Aa(t){return[Ne,Fe,Ie,Ae].some(function(o){return t[o]>=0})}function np(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=vt(o,{elementContext:"reference"}),d=vt(o,{altBoundary:!0}),l=Na(s,a),c=Na(d,r,i),p=Aa(l),u=Aa(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ap={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:np};function rp(t,o,n){var a=Ge(t),r=[Ae,Ne].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[Ae,Fe].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function lp(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=fa.reduce(function(p,u){return p[u]=rp(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const ip={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lp};function sp(t){var o=t.state,n=t.name;o.modifiersData[n]=Sa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const cp={name:"popperOffsets",enabled:!0,phase:"read",fn:sp,data:{}};function dp(t){return t==="x"?"y":"x"}function pp(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,m=n.tether,g=m===void 0?!0:m,C=n.tetherOffset,f=C===void 0?0:C,w=vt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),_=Ge(o.placement),k=_t(o.placement),S=!k,h=Zo(_),E=dp(h),B=o.modifiersData.popperOffsets,I=o.rects.reference,A=o.rects.popper,V=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,N=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),O=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,v={x:0,y:0};if(B){if(i){var P,x=h==="y"?Ne:Ae,F=h==="y"?Ie:Fe,L=h==="y"?"height":"width",j=B[h],U=j+w[x],y=j-w[F],b=g?-A[L]/2:0,T=k===Ct?I[L]:A[L],D=k===Ct?-A[L]:-I[L],M=o.elements.arrow,z=g&&M?Jo(M):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ga(),Q=K[x],ee=K[F],ae=$t(0,I[L],z[L]),ge=S?I[L]/2-b-ae-Q-N.mainAxis:T-ae-Q-N.mainAxis,ye=S?-I[L]/2+b+ae+ee+N.mainAxis:D+ae+ee+N.mainAxis,Ve=o.elements.arrow&&Dt(o.elements.arrow),se=Ve?h==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,Ce=(P=O==null?void 0:O[h])!=null?P:0,et=j+ge-Ce-se,mo=j+ye-Ce,ct=$t(g?Xt(U,et):U,j,g?it(y,mo):y);B[h]=ct,v[h]=ct-j}if(d){var dt,At=h==="x"?Ne:Ae,pt=h==="x"?Ie:Fe,Le=B[E],Qe=E==="y"?"height":"width",tt=Le+w[At],ot=Le-w[pt],Re=[Ne,Ae].indexOf(_)!==-1,ut=(dt=O==null?void 0:O[E])!=null?dt:0,ft=Re?tt:Le-I[Qe]-A[Qe]-ut+N.altAxis,mt=Re?Le+I[Qe]+A[Qe]-ut-N.altAxis:ot,nt=g&&Re?Dd(ft,Le,mt):$t(g?ft:tt,Le,g?mt:ot);B[E]=nt,v[E]=nt-Le}o.modifiersData[a]=v}}const up={name:"preventOverflow",enabled:!0,phase:"main",fn:pp,requiresIfExists:["offset"]};function fp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function mp(t){return t===Ee(t)||!De(t)?en(t):fp(t)}function hp(t){var o=t.getBoundingClientRect(),n=wt(o.width)/t.offsetWidth||1,a=wt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function yp(t,o,n){n===void 0&&(n=!1);var a=De(o),r=De(o)&&hp(o),i=Ze(o),s=kt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Ue(o)!=="body"||on(i))&&(d=mp(o)),De(o)?(l=kt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=tn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function gp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function bp(t){var o=gp(t);return Vd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Cp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function wp(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 Ta={placement:"bottom",modifiers:[],strategy:"absolute"};function Ea(){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 kp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Ta:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ta,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(_){var k=typeof _=="function"?_(p.options):_;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:lt(d)?Mt(d):d.contextElement?Mt(d.contextElement):[],popper:Mt(l)};var S=bp(wp([].concat(a,p.options.modifiers)));return p.orderedModifiers=S.filter(function(h){return h.enabled}),C(),g.update()},forceUpdate:function(){if(!m){var _=p.elements,k=_.reference,S=_.popper;if(Ea(k,S)){p.rects={reference:yp(k,Dt(S),p.options.strategy==="fixed"),popper:Jo(S)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(N){return p.modifiersData[N.name]=Object.assign({},N.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var E=p.orderedModifiers[h],B=E.fn,I=E.options,A=I===void 0?{}:I,V=E.name;typeof B=="function"&&(p=B({state:p,options:A,name:V,instance:g})||p)}}}},update:Cp(function(){return new Promise(function(w){g.forceUpdate(),w(p)})}),destroy:function(){f(),m=!0}};if(!Ea(d,l))return g;g.setOptions(c).then(function(w){!m&&c.onFirstUpdate&&c.onFirstUpdate(w)});function C(){p.orderedModifiers.forEach(function(w){var _=w.name,k=w.options,S=k===void 0?{}:k,h=w.effect;if(typeof h=="function"){var E=h({state:p,name:_,instance:g,options:S}),B=function(){};u.push(E||B)}})}function f(){u.forEach(function(w){return w()}),u=[]}return g}}var _p=[Hd,cp,Gd,Od,ip,op,up,Pd,ap],xp=kp({defaultModifiers:_p});function an(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 Va(t,o){if(t){if(typeof t=="string")return an(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)?an(t,o):void 0}}function Sp(t){return function(o){if(Array.isArray(o))return an(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Va(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 xt(t){return xt=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},xt(t)}function La(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Ba(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){La(i,a,r,s,d,"next",l)}function d(l){La(i,a,r,s,d,"throw",l)}s(void 0)})}}var Oa={exports:{}},Ia={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})(Ia),function(t){var o=Ia.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(y,b,T){y[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,T){return Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,T,D){return b[T]=D}}function g(y,b,T,D){var M=b&&b.prototype instanceof h?b:h,z=Object.create(M.prototype),K=new j(D||[]);return d(z,"_invoke",{value:P(y,T,K)}),z}function C(y,b,T){try{return{type:"normal",arg:y.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var f="suspendedStart",w="suspendedYield",_="executing",k="completed",S={};function h(){}function E(){}function B(){}var I={};m(I,c,function(){return this});var A=Object.getPrototypeOf,V=A&&A(A(U([])));V&&V!==i&&s.call(V,c)&&(I=V);var N=B.prototype=h.prototype=Object.create(I);function O(y){["next","throw","return"].forEach(function(b){m(y,b,function(T){return this._invoke(b,T)})})}function v(y,b){function T(M,z,K,Q){var ee=C(y[M],y,z);if(ee.type!=="throw"){var ae=ee.arg,ge=ae.value;return ge&&o(ge)=="object"&&s.call(ge,"__await")?b.resolve(ge.__await).then(function(ye){T("next",ye,K,Q)},function(ye){T("throw",ye,K,Q)}):b.resolve(ge).then(function(ye){ae.value=ye,K(ae)},function(ye){return T("throw",ye,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function(M,z){function K(){return new b(function(Q,ee){T(M,z,Q,ee)})}return D=D?D.then(K,K):K()}})}function P(y,b,T){var D=f;return function(M,z){if(D===_)throw new Error("Generator is already running");if(D===k){if(M==="throw")throw z;return{value:a,done:!0}}for(T.method=M,T.arg=z;;){var K=T.delegate;if(K){var Q=x(K,T);if(Q){if(Q===S)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===f)throw D=k,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=_;var ee=C(y,b,T);if(ee.type==="normal"){if(D=T.done?k:w,ee.arg===S)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=k,T.method="throw",T.arg=ee.arg)}}}function x(y,b){var T=b.method,D=y.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,x(y,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),S;var M=C(D,y.iterator,b.arg);if(M.type==="throw")return b.method="throw",b.arg=M.arg,b.delegate=null,S;var z=M.arg;return z?z.done?(b[y.resultName]=z.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,S):z:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,S)}function F(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function L(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function j(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(F,this),this.reset(!0)}function U(y){if(y||y===""){var b=y[c];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,D=function M(){for(;++T<y.length;)if(s.call(y,T))return M.value=y[T],M.done=!1,M;return M.value=a,M.done=!0,M};return D.next=D}}throw new TypeError(o(y)+" is not iterable")}return E.prototype=B,d(N,"constructor",{value:B,configurable:!0}),d(B,"constructor",{value:E,configurable:!0}),E.displayName=m(B,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===E||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,B):(y.__proto__=B,m(y,u,"GeneratorFunction")),y.prototype=Object.create(N),y},r.awrap=function(y){return{__await:y}},O(v.prototype),m(v.prototype,p,function(){return this}),r.AsyncIterator=v,r.async=function(y,b,T,D,M){M===void 0&&(M=Promise);var z=new v(g(y,b,T,D),M);return r.isGeneratorFunction(b)?z:z.next().then(function(K){return K.done?K.value:z.next()})},O(N),m(N,u,"Generator"),m(N,c,function(){return this}),m(N,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),T=[];for(var D in b)T.push(D);return T.reverse(),function M(){for(;T.length;){var z=T.pop();if(z in b)return M.value=z,M.done=!1,M}return M.done=!0,M}},r.values=U,j.prototype={constructor:j,reset:function(y){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(L),!y)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function T(ee,ae){return z.type="throw",z.arg=y,b.next=ee,ae&&(b.method="next",b.arg=a),!!ae}for(var D=this.tryEntries.length-1;D>=0;--D){var M=this.tryEntries[D],z=M.completion;if(M.tryLoc==="root")return T("end");if(M.tryLoc<=this.prev){var K=s.call(M,"catchLoc"),Q=s.call(M,"finallyLoc");if(K&&Q){if(this.prev<M.catchLoc)return T(M.catchLoc,!0);if(this.prev<M.finallyLoc)return T(M.finallyLoc)}else if(K){if(this.prev<M.catchLoc)return T(M.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return T(M.finallyLoc)}}}},abrupt:function(y,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var M=D;break}}M&&(y==="break"||y==="continue")&&M.tryLoc<=b&&b<=M.finallyLoc&&(M=null);var z=M?M.completion:{};return z.type=y,z.arg=b,M?(this.method="next",this.next=M.finallyLoc,S):this.complete(z)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),S},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),L(T),S}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===y){var D=T.completion;if(D.type==="throw"){var M=D.arg;L(T)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,T){return this.delegate={iterator:U(y),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),S}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Oa);var to=Oa.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function Np(t){var o=function(n,a){if(xt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(xt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return xt(o)==="symbol"?o:String(o)}function rn(t,o,n){return(o=Np(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=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 i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,m=p-s,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var C=m/t.size*100,f=100-g/t.size*100;n("change",C,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Fa=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Ap=Fa(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Tp=Fa(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(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))}}Ke(".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}"),no.render=function(t,o,n,a,r,i){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"]))},[Ap,Tp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=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 i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Ep={ref:"canvas"};Ke(".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}"),ao.render=function(t,o,n,a,r,i){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",Ep,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=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(),i=function(){var s=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Vp={ref:"canvas"};Ke(".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}"),ro.render=function(t,o,n,a,r,i){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",Vp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=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")}}}}),Lp={class:"input"},Bp={class:"label"},Op=[".value"];function Pt(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 i,s,d,l,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(m){u=!0,s=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||Va(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 $e(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){rn(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}Ke(".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}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Lp,[e.createElementVNode("span",Bp,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,Op)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var $a=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},Ma={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(Ma[o]||o).concat(Ma[n]||n)},va=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(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)},jt=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,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},Pa=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=$a(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=jt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(va(jt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var m=$a(a,r/100,i/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(i),"%)");case"rgb":var g=jt(a,r,i),C=g.r,f=g.g,w=g.b;return"rgb(".concat(C,", ").concat(f,", ").concat(w,")");default:return va(jt(a,r,i))}},so=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,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ja=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},Ra=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]}},ln=function(t,o,n){if(typeof t=="string"&&t!==""){var a=sn(t,cn(t),n),r=Ha(a);return Pa(r,o,n)}return""},Ua=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ga=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},za=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},sn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ua(t),a=n.r,r=n.g,i=n.b,s=n.a;return $e($e({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=za(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ga(t),c=l.h,p=l.s,u=l.l,m=l.a;return $e($e({},ja({h:c,s:p,l:u})),{},{a:+m});default:var g=Ra(t),C=g.r,f=g.g,w=g.b,_=g.a;return $e($e({},so({r:C,g:f,b:w})),{},{a:_/255})}else switch(o){case"rgb":return $e($e({},so(Ua(t))),{},{a:1});case"hsv":var k=za(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return $e($e({},ja(Ga(t))),{},{a:1});default:return $e($e({},so(Ra(t))),{},{a:1})}},cn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Ha=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}},Rt=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)+"")}),i=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"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(l,"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(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Ip=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Rt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Ip)},Rt.__scopeId="data-v-02da71fd",Rt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:Rt},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 ln(a,"hex",!0)})})}}}),Fp={class:"colors"};function Ya(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 ze(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},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 ze(ze({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var k,S=(k=t.value)===null||k===void 0?void 0:k.trim();if(S!=null&&S!==""){var h=cn(S);return Ha(sn(S,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,S){var h="";k!=null?(h=Pa(ze({},k),t.format,t.showAlpha),s.value=ze({},k)):s.value=null,d.value=h;var E=l();JSON.stringify(k)!==JSON.stringify(E)&&JSON.stringify(k)!==JSON.stringify(S)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,S;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(S=e.unref(i))===null||S===void 0?void 0:S.a:1}),g=e.computed(function(){return jt(e.unref(c),e.unref(p),e.unref(u))}),C=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),w=e.ref(-1),_=function(k,S,h){if(k.length!==0){var E=sn(k,S,h),B=E.h,I=E.s,A=E.v;if(!(isNaN(B)||isNaN(I)||isNaN(A))){var V=1,N=E.a;isNaN(N)||(V=N),i.value={h:B,s:I,v:A,a:V}}}};return{h:c,s:p,v:u,a:m,rgbStr:C,onSelectSaturation:function(k,S){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:k,v:S,a:e.unref(m)}:i.value=ze(ze({},e.unref(i)),{},{s:k,v:S})},onSelectHue:function(k){w.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=ze(ze({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:k}:i.value=ze(ze({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){w.value=-1,d.value=k},handleChange:function(){var k,S=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(S!==""){var h=t.showAlpha,E=t.format,B=function(I,A,V){if(V)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(I);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(I);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(I);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(I)}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(I);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(I);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(I);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(I)}}(S,E,h);B?_(S,E,h):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:w,onSelectColor:function(k,S){if(w.value=S,(k=k.trim())==="")i.value=null;else{var h=cn(k);h?_(k,h,!0):i.value=null}}}}}),Dp={class:"picker-inner"},$p={class:"picker-header"};Ke(".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}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=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",Dp,[e.createElementVNode("div",$p,[e.createVNode(s,{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(l,{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)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=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"):""}})}}}),Mp=[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 dn(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){rn(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}Ke(".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}"),uo.render=function(t,o,n,a,r,i){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(Mp),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var st=null,Nt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Rt,Picker:po,AddColorItem:uo},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(x){return ln(x,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var x=t.value||"",F=Array.isArray(x)?x:[x];a.value=F.map(function(L){return ln(L,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,m,g,C,f=e.ref(null),w=e.ref(null),_=(l=f,c=w,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){st.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(x){var F=x.state,L=F.styles,j=F.placement,U=L.popper;u.value=dn(dn(dn({},U),p),{},{transformOrigin:j==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(x,F){var L,j=Pt(x,2),U=j[0],y=j[1],b=Pt(F,2),T=b[0],D=b[1];if(U&&y&&(T!==U||D!==T)){(L=st)===null||L===void 0||L.destroy();var M=U.$el||U,z=y.$el||y;e.nextTick(function(){st=xp(M,z,m)})}}),e.onBeforeUnmount(function(){var x;st&&((x=st)===null||x===void 0||x.destroy(),st=null)}),{instance:st,style:u}),k=_.style,S=function(){e.unref(f)==null&&(f.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){i.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]))},E=e.ref(),B=function(){var x=Ba(oo.mark(function F(L){var j,U,y,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(U=L.target,(y=(j=U.dataset)===null||j===void 0?void 0:j.index)!=null&&y!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){S(),clearTimeout(g)},100)):S(),i.value=b,f.value=U;case 10:case"end":return T.stop()}},F)}));return function(F){return x.apply(this,arguments)}}(),I=function(){var x=Ba(oo.mark(function F(L){var j,U,y,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=L.target,!(!((j=e.unref(E))!==null&&j!==void 0&&j.isEqualNode(b))&&(!((U=e.unref(E))===null||U===void 0)&&U.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(y=e.unref(w))===null||y===void 0?void 0:y.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:C&&clearTimeout(C),C=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return D.stop()}},F)}));return function(F){return x.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(S(),clearTimeout(C))});var A,V=e.ref(t.max>e.unref(a).length),N=e.computed(function(){return typeof t.popupContainer=="string"||xt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),O=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),v=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(w)]},function(){e.nextTick(function(){var x,F;(x=e.unref(E))===null||x===void 0||x.setAttribute("pick-colors-theme",e.unref(v)),(F=e.unref(w))===null||F===void 0||(F=F.$el)===null||F===void 0||F.setAttribute("pick-colors-theme",e.unref(v))})},{immediate:!0}),e.provide("theme",{theme:v});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",I,!1),t.showPicker&&S()}),e.onUnmounted(function(){document.removeEventListener("mouseup",I,!1),g&&(clearTimeout(g),g=null),C&&(clearTimeout(C),C=null)}),{valueList:a,colorItemSelected:function(x){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===x},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(x){var F=e.unref(i),L=e.unref(a).slice(),j=e.unref(a).length;if(F!=null){F>=0?L[F]=x:(i.value=j,L.push(x));var U="";U=Array.isArray(t.value)||t.addColor?L:x,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,x,F)),t.addColor&&j>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:E,onColorClick:B,pickerRef:w,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var F=x.target;A=+F.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var F=+x.target.dataset.index,L=Sp(e.unref(a)),j=L[A];L.splice(A,1);var U=L.slice(0,F),y=L.splice(F),b=U.concat([j]).concat(y);n("update:value",b),n("change",b,b[A],A)},colorItemsRef:P,pickerStyle:k,values:r,teleportDisabled:O,toPopupContainer:N}}});Ke(".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)}"),Nt.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=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(s,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},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(l,{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)},Nt.__scopeId="data-v-3c43ade8",Nt.__file="src/ColorPicker.vue";const vp=e.defineComponent({name:"ColorPick",components:{PickColors:Nt,AInput:$.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}}}}),tm="",Pp={class:"color-pick"};function jp(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Rp=oe(vp,[["render",jp],["__scopeId","data-v-e2113f43"]]),Up=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Nt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),om="",Gp={class:"color-group-pick"};function zp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Hp=oe(Up,[["render",zp],["__scopeId","data-v-b2be8322"]]),Yp=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:Lo,MinusCircleOutlined:Gl,PickColors:Nt,InputNumber:da,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 u;const c=(u=t.value)==null?void 0:u.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 g=Object.keys(m),C={};g.forEach(f=>{C[f]=""}),c.push(C)}else typeof m=="string"&&c.push(m);n.value=c}else $.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const C=c==null?void 0:c.target,f=(C==null?void 0:C.value)!=null?C==null?void 0:C.value:c;u?m[p][u]=f:m[p]=f,n.value=m}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),nm="",Wp={class:"form-group"},qp={class:"form-row"},Kp={key:0,class:"label"},Qp={key:1,class:"label"},Xp={class:"icon-group"};function Jp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Wp,[e.createVNode(s,{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",qp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Kp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Qp,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Xp,[(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(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Zp=oe(Yp,[["render",Jp],["__scopeId","data-v-f0c0ab4d"]]),eu=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:$.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function tu(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const ou=oe(eu,[["render",tu]]),nu=e.defineComponent({name:"PropsToForm",components:{Input:ld,InputNumber:da,RadioGroup:pd,Select:md,Switch:gd,ColorPick:Rp,ColorGroupPick:Hp,FormGroup:Zp,Textarea:ou},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Gt),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:m}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:C="change",events:f}=p;c[u]={...p,valueProp:g,value:m,events:{[C]:(w,_=!0)=>{i(_?{[u]:w}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:J.reduce(l,(c,p,u)=>{const m=nd[u];if(Array.isArray(m)){const g=m.find(C=>{const{onlyType:f,excludeType:w}=C;return f==null&&w==null?!0:f?he(e.unref(r),f):w?!he(e.unref(r),w):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:he}}}),am="",au={class:"props-to-form"},ru={class:"label"},lu={class:"component-wrapper"};function iu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",ru,e.toDisplayString(s.label),1),e.createElementVNode("div",lu,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const su=oe(nu,[["render",iu],["__scopeId","data-v-c6fb2484"]]);function cu(){return new Worker("/assets/editor.worker-02df2e61.js")}function du(){return new Worker("/assets/json.worker-867823a6.js")}function pu(){return new Worker("/assets/ts.worker-7254b425.js")}const uu=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(i,s){return s==="json"?new du:s==="typescript"||s==="javascript"?new pu:new cu}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=tr.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(J.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),rm="",fu={class:"editor",ref:"dom"};function mu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",fu,null,512)}const qa=oe(uu,[["render",mu],["__scopeId","data-v-71e88372"]]),hu=[{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}],yu=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:qa},setup(){const t=e.inject(Ye),o=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),n=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var w,_,k;let f=[];if(r.value=[],!o.value)f=((w=e.unref(n))==null?void 0:w.queryColumnList)||[];else{const S=((_=e.unref(n))==null?void 0:_.rowHeaderList)||[],h=((k=e.unref(n))==null?void 0:k.indicators)||[];f=[...S,...h]}f.forEach(S=>{var E;let h=(E=e.unref(a))==null?void 0:E.find(B=>B.prop===S.name);h||(h={label:S.label,prop:S.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:hu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,w,_)=>{f&&w&&(i=f,s=w,d.value=f[w]||"",c.value=!0,l.value=_)},onEditorChange:f=>{try{d.value=f}catch(w){console.error(w)}},changeRenderBool:(f,w)=>{f.style=w.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),lm="",gu={class:"table-column-config"};function bu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",gu,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:C,text:f,record:w})=>[C.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:_=>t.changeRenderBool(w,_),checked:w.style},null,8,["onChange","checked"])):C.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:w.width,"onUpdate:value":_=>w.width=_,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):C.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.renderText,"onUpdate:value":_=>w.renderText=_,readOnly:!0,onClick:_=>t.renderSave(w,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.headerTemplate,"onUpdate:value":_=>w.headerTemplate=_,readOnly:!0,onClick:_=>t.renderSave(w,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:w.headerAlign,"onUpdate:value":_=>w.headerAlign=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:w.align,"onUpdate:value":_=>w.align=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:w.fixed,"onUpdate:value":_=>w.fixed=_},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:w.dataFormat,"onUpdate:value":_=>w.dataFormat=_,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[w.dataFormat&&w.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:w.retentiondigit,"onUpdate:value":_=>w.retentiondigit=_,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=C=>t.editorVisible=C),"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 Cu=oe(yu,[["render",bu],["__scopeId","data-v-afebddc0"]]),wu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:su,TableColumnConfig:Cu,Editor:qa,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Gt),r=e.inject(hn),i=e.inject(ho),s=e.inject(yo),d=e.inject(mn),l=E=>{i({...wn[E]},!1),d()},c=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>od.map(E=>{const{props:B,title:I,enableProps:A,onlyType:V,excludeType:N}=E,O=[];B.forEach(x=>{typeof x=="string"&&(p.includes(x)?t.isGroupTable&&O.push(x):O.push(x))});let v,P;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(v=typeof A=="string"&&r.value?r.value[A]:void 0,P=J.pick(e.unref(r),O)):(v=typeof A=="string"&&a.value?a.value[A]:void 0,P=J.pick(e.unref(a),O)),{title:I,enableProps:v,enablePropsName:A,onlyType:V,excludeType:N,props:P}}).filter(({props:E})=>Object.keys(E).length>0)),m=(E,B)=>{const{onlyType:I,excludeType:A}=E;return I==null&&A==null?!0:I?he(B,I):A?!he(B,A):!1},g=(E,B)=>(B==null||B.stopPropagation(),E),C=(E,B)=>{B!=null&&i({[B]:E})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),w=E=>{try{const B=JSON.parse(E||"{}");i(B,!1)}catch(B){console.error(B)}},_=e.ref(""),k=E=>{try{_.value=E}catch(B){console.error(B)}},S=(E,B)=>{try{s({[B]:E})}catch(I){console.error(I)}},h=e.computed(()=>{var E;return["customGraph"].includes((E=e.unref(a))==null?void 0:E.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:w,tableOptions:r,optionCode:_,onEditorChange:k,tableEditorChange:S,onSwitchClick:g,onSwitchChange:C,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),im="",sm="",ku={class:"style-group"};function _u(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),C=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",ku,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:f.enableProps,onChange:w=>t.onSwitchChange(w,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{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(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var w;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((w=f.onlyType)!=null&&w.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(C)]),_:1}),e.createVNode(u,{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]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{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]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const xu=oe(wu,[["render",_u],["__scopeId","data-v-2fb3e2ad"]]),Su=e.defineComponent({name:"Card",components:{CloseOutlined:Kt,MenuOutlined:Xn,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(zt),a=e.inject(bn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,T)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const y=[],b=(T=e.unref(d))==null?void 0:T.find(M=>{var z;return M.id===((z=t.control)==null?void 0:z.id)});if(b){const M=b.type,z=J.pick(b,["value","startTime","endTime"]);(D=Object.keys(z))!=null&&D.length||(z.value="");for(const K in z)if(Object.prototype.hasOwnProperty.call(z,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(ae=>he(M,ae.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{s(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(T=>T.id===y);if(b){const{type:T,id:D,events:M=[]}=b,z=Qt(T),K=M.findIndex(Q=>{var ee;return Q.on===z&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&(M.splice(K,1),n({id:D,events:M}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const T=e.unref(d).find(D=>D.id===y);T&&(b.keyName=T.keyName,I(T,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),C=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},w=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},_=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},S=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),E=e.inject(me),B=e.computed(()=>{var Ve;const{classificationList:y=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:M=[],rowHeaderList:z=[],queryColumnList:K=[]}=e.unref(E),Q=J.cloneDeep([...y,...b,...T,...D,...M,...z,...K]);if(Q!=null&&Q.length)for(const se of Q)se.id=se.name;const ee=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(se=>({...se,id:se.name,label:se.title||se.label})),...Q];if(((Ve=e.unref(h))==null?void 0:Ve.type)==="ecanSelect"){const{selectFieldOptions:se=[]}=e.unref(E);if(ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"}),se!=null&&se.length)for(const Ce of se)ee.unshift({label:Ce.label,name:Ce.value,id:Ce.value,genericType:"TEXT"})}const ae=new Map,ge=ee.length;for(let se=0;se<ge;se++){const Ce=ee[se],{id:et}=Ce||{};ae.set(et,Ce)}return[...ae].map(([se,Ce])=>Ce)});function I(y,b){var K,Q;const{type:T,id:D,events:M=[]}=y,z=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(E))==null?void 0:K.controlList)||[]).find(ae=>ae.id===e.unref(g))||u(e.unref(g))),M.find(ee=>{var ae;return ee.on===z&&ee.target===((ae=e.unref(h))==null?void 0:ae.id)&&ee.emit==="refreshData"})||n({id:D,events:[...M,{on:z,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const A=(y,b)=>{if(y){const{label:T,name:D,id:M,genericType:z,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},ae={...t.control,conditionKey:M,conditionLabel:T,conditionName:D,conditionValueType:z,indexCode:K,typeGuid:Q,indexCodeNum:ee};bt(ae,"rule")||(ae.rule="EQUAL"),bt(ae,"dataType")||(ae.dataType="component"),r({control:ae,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},V=(y,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},N=(y,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},O=e.computed(()=>{const y=e.unref(B).find(T=>T.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="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"}]:[]}),v=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(z=>z.id===b),M=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];he(D==null?void 0:D.type,M)&&(y=!0)}return y}),x=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(y=!0)}return y}),F=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:m,onIdFocus:C,onPropChange:f,onModeChange:S,onRuleChange:w,onDataTypeChange:_,onCustomValueChange:k,conditionKeyOptions:B,onConditionKeyChange:A,idFilterOption:V,filterOption:N,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:O,dataTypeOption:v,isShowProp:x,isShowFormat:F,isShowModelProp:P,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"}]}}}),cm="",dm="",Nu={class:"control-card"};function Au(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Nu,[e.createVNode(s,{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(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(s,{key:3,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(s,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Tu=oe(Su,[["render",Au],["__scopeId","data-v-bc3e26e4"]]),Eu=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:Tu}}),pm="",Vu={key:0,class:"condition-list"},Lu={key:0,class:"condition-container"},Bu={key:0,class:"condition-text"},Ou={key:1,class:"condition-text"},Iu={class:"conditions"};function Fu(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Lu,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Bu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Ou,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Iu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Du=oe(Eu,[["render",Fu],["__scopeId","data-v-916ff9bd"]]),$u=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Du,AButton:$.Button},setup(){const t=e.inject(Pe),o=e.inject(me),n=e.inject(Se),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(bt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),bt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:la({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:_e()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:_e()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:_e()}),i({controlList:u})))},d=p=>{var w,_,k,S;const{index:u,path:m}=p;let g=J.cloneDeep((w=e.unref(a))==null?void 0:w.slice()),C=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(C[h])C=(_=C[h])==null?void 0:_.conditions;else break;if(Array.isArray(C)&&C[u])if(C.splice(u,1),C.length===1){if(f.length>0){const h=f.length-1,E=f[h],B=f.slice(0,h);let I=g,A="";for(const V of B)if(I[V])A=(k=I[V])==null?void 0:k.join,I=(S=I[V])==null?void 0:S.conditions;else break;if(A===C[0].join){if(Array.isArray(C[0].conditions)){const V=J.cloneDeep(C[0].conditions);I.splice(+E,1),I.splice(+E,0,...V)}}else I[E]=C[0]}}else C.length===0&&(g=[]);i({controlList:g})}},l=p=>{var _,k;const{control:u,index:m,path:g}=p,C=J.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let f=C;const w=g.split("-");if(w!=null&&w.length)for(const S of w)if(f[S])f=(k=f[S])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:C})},c=(p,u,m)=>{var _,k,S;const g=J.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let C=g,f="";const w=p.split("-");if(w!=null&&w.length){for(const h of w)if(C[h])f=(k=C[h])==null?void 0:k.join,C=(S=C[h])==null?void 0:S.conditions;else break;if(f===m)C.splice(u+1,0,{keyValue:_e()});else{const h=J.cloneDeep(C[u]);C[u]={join:m,conditions:[h,{keyValue:_e()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),um="",Mu={class:"control-group"},vu={class:"control-group-header"},Pu={class:"control-group-content"};function ju(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Mu,[e.createElementVNode("div",vu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Pu,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Ru=oe($u,[["render",ju],["__scopeId","data-v-1e37d2d3"]]),Uu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Kt,AppstoreAddOutlined:Lo,ASelect:$.Select,ASelectOption:$.SelectOption,AInput:$.Input,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(Pe),r=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.filter(E=>E.keyName!=="")}),i=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],s=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],d=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],l=e.ref(J.cloneDeep(t.item));e.watch(l,h=>{o("update",{...h,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var E;let h=null;if(((E=e.unref(l))==null?void 0:E.dataType)==="component"){const B=e.unref(r).find(I=>{var A;return I.id===((A=e.unref(l))==null?void 0:A.id)});B&&(h=B)}return h}),p=e.computed(()=>{var E;let h=!1;return((E=e.unref(l))==null?void 0:E.variableType)==="DATE"&&(h=!0),h}),u=e.computed(()=>{let h=!1;return e.unref(c)&&(h=he(e.unref(c).type,"range")),h}),m=e.computed(()=>{let h=!1;return e.unref(c)&&(he(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(h=!0):he(e.unref(c).type,"date")&&(h=!0)),h}),g=(h,E)=>{h&&(e.unref(l).keyName=E.keyName)},C=()=>{o("delete",t.index)},f=e.computed(()=>e.unref(p)?[{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"}]:[]),w=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},_=()=>{e.unref(l).format=null},k=(h,E)=>{var B;return(B=E==null?void 0:E.keyName)==null?void 0:B.toLowerCase().includes(h==null?void 0:h.toLowerCase())};return e.watch(m,h=>{h&&(e.unref(l).operateType||(e.unref(l).operateType="add"),e.unref(l).operateMode||(e.unref(l).operateMode="year"),e.unref(l).operateValue||(e.unref(l).operateValue=0),e.unref(l).activeOperateKey||(e.unref(l).activeOperateKey=1))},{immediate:!0}),{variableData:l,typeOption:i,dataTypeOption:s,usedComponentList:r,formatOptions:f,rangeTypeOptions:d,isShowFormat:p,isDateRangeComponent:u,isShowDateOperate:m,popoverVisible:n,idFilterOption:k,onChangeComponent:g,onDelete:C,onChangeDataType:w,onChangeVariableType:_,changeTab:h=>{e.unref(l).activeOperateKey=h,h===1?e.unref(l).operateValue=0:h===2&&(e.unref(l).operateValue="rangeValue")}}}}),fm="",Gu={class:"variable-item"},zu=["title"],Hu={class:"popover-content-wrap"},Yu={style:{display:"flex"}};function Wu(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("a-tabs"),m=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),C=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Gu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,zu)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=f=>t.variableData.variableName=f),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=f=>t.variableData.variableType=f),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=f=>t.variableData.dataType=f),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=f=>t.variableData.id=f),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=f=>t.variableData.variableValue=f),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=f=>t.variableData.dateTypeValue=f),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=f=>t.variableData.format=f),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(g,{key:4,visible:t.popoverVisible,"onUpdate:visible":o[14]||(o[14]=f=>t.popoverVisible=f),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Hu,[e.createVNode(u,{defaultActiveKey:t.variableData.activeOperateKey,onChange:t.changeTab},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{tab:"日期偏移",key:1},{default:e.withCtx(()=>[e.createVNode(c,{class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=f=>t.variableData.operateValue=f),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=f=>t.variableData.operateType=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=f=>t.variableData.operateMode=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])]),_:1})),t.isDateRangeComponent?(e.openBlock(),e.createBlock(p,{tab:"自定义",key:2},{default:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(d,{value:t.variableData.operateValue,"onUpdate:value":o[10]||(o[10]=f=>t.variableData.operateValue=f),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[11]||(o[11]=f=>t.variableData.operateMode=f),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[12]||(o[12]=f=>t.variableData.operateType=f)},{default:e.withCtx(()=>[e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[13]||(o[13]=f=>{t.popoverVisible=!0})},[e.createVNode(m)])]),_:1},8,["visible"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const qu=oe(Uu,[["render",Wu],["__scopeId","data-v-1d5b6ae6"]]),Ku=e.defineComponent({name:"VariableGroup",components:{VariableItem:qu},setup(){const t=e.inject(me),o=e.inject(Se),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Bt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=J.cloneDeep(e.unref(a));l.push({keyValue:_e(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0,activeOperateKey:1}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=J.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=J.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),mm="",Qu={class:"variable-group"},Xu={class:"variable-group-header"},Ju={class:"variable-group-content"};function Zu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Qu,[e.createElementVNode("div",Xu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",Ju,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const ef=oe(Ku,[["render",Zu],["__scopeId","data-v-fd60cd09"]]),tf=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:C,builtInCalcWay:f,formula:w,conditions:_,aggregate:k}=s;let S;return _&&(S=r(_)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:C,builtInCalcWay:f,formula:w,conditions:S}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:C=[],seriesList:f=[],leftAxisList:w=[],rightAxisList:_=[],queryColumnList:k=[],indicators:S=[],dataSourceId:h,idxLibMode:E,preview:B=!1}=s||{};m==null&&(he(d,"table")?m="1":m="2");let I;if(Array.isArray(C)&&C.length>0){const O=C.length;for(let v=0;v<O;v++){const P=C[v]||{},{label:x="",name:F="",show:L=!1,sort:j,customGroup:U,conditions:y}=P;if(L||O===1){I={label:x.trim(),columnName:F,show:L,sort:j,customGroup:U,conditions:r(y)};break}}}let A;if(Array.isArray(f)&&f.length>0){const O=f.length;for(let v=0;v<O;v++){const P=f[v]||{},{label:x="",name:F="",show:L=!1,sort:j,customGroup:U,conditions:y}=P;if(L||O===1){A={label:x.trim(),columnName:F,show:L,sort:j,customGroup:U,conditions:r(y)};break}}}const V=[];k==null||k.forEach(O=>{V.push(o(O))});const N=[];if(w==null||w.forEach(O=>{O.location="LEFT",N.push(i(O))}),_==null||_.forEach(O=>{O.location="RIGHT",N.push(i(O))}),S==null||S.forEach(O=>{O.location="LEFT",N.push(i(O))}),!(m==="1"&&V.length===0)&&!(m==="2"&&N.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:g,classification:I,series:A,indicatorList:N,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:E,preview:B})}catch(O){console.error(O)}}},Ka=(t,o)=>{const n={dayjs:de,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let m=0;m<u.length;m++){const g=u[m],C=i[g];C!=null&&(c=c.replace(g,C))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Ka(c,n)),t=t.replace(l,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},Ut=(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 i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=Ka(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},of=(t,o,n)=>{switch(t.type){case"bar":return nf(t,o,n);case"line":return af(t,o,n);case"pie":return rf(t,o,n);case"comboGraph":return lf(t,o,n);default:return{}}},nf=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let m=0;m<p;m++){const g={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.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 u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:C,seriesName:f,name:w,value:_,data:k}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(m,{textData:{marker:C,name:w,value:_,a:f,b:w,c:_,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},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(l),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 Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i: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 Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},af=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[u],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 u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:C,seriesName:f,name:w,value:_,data:k}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(m,{textData:{marker:C,name:w,value:_,a:f,b:w,c:_,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},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 Ut(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 Ut(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(l)}},rf=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,c,d:p,...u}},{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:Es(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:{}}}]}},lf=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ut(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:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<c;g++){const C=m[g],{tooltipFormatter:f}=C||{},{marker:w,seriesName:_,name:k,value:S,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fo(f||u,{textData:{marker:w,name:k,value:S,seriesName:_,a:_,b:k,c:S,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),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(s)}},sf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:C,value:f}=g,w={...t[0],value:t[0][f]};r.add(C),p.push(w)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],m=u[n];r.add(m);for(let g=0;g<d;g++){const C=a[g],{label:f,value:w}=C,_={...u,value:u[w]};if(i.has(f)){const k=i.get(f);k.push(_),i.set(f,k)}else i.set(f,[_])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},cf=(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 i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[n]||"",g=u[a]||"",C=u[r]||"";if(i.add(m),s.has(C)){const f=s.get(C);f.push({name:m,value:g,...u}),s.set(C,f)}else s.set(C,[{name:m,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},df=e.defineComponent({name:"ChartGraph",components:{ASpin:$.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Me);let i=null;const s=e.inject(ve)||"",d=e.inject(me)||{},l=e.inject(Gt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),C=e.computed(()=>g.value?rr:12),f=e.ref({}),w=e.ref(),_=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return w.value;const N=of(V,e.unref(f),C.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.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,...N}}),k=(V=[],N,O=!1)=>{const v=O?N:null;f.value=sf(V,v)},S=(V=[],N)=>{f.value=cf(V,N)},h=async()=>{var V,N,O;try{const v=tf({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});m.value=!0;const P=await v(),{columns:x=[],rows:F=[]}=((N=P==null?void 0:P.data)==null?void 0:N.data)??{};if(((O=e.unref(n.value))==null?void 0:O.type)==="pie"){let L=[];if(x.length>0){const j=x[0],U=x[1];L=F.map(y=>({name:y[j],value:y[U]}))}S(L)}else{let L;x.length>0&&(L={name:x[0],types:x.slice(1).map(j=>({label:j,value:j}))}),k(F,L,!0)}}catch(v){console.error(v)}finally{m.value=!1}},E={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},B=()=>{e.unref(f).dataset.length===0?u.value.setOption(E):u.value.setOption(_.value)},I=()=>{e.unref(n.value).type!=="customGraph"&&h()},A=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(_,()=>{B()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const N=eval;w.value=N(V)}catch(N){console.error(N)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(A),i.observe(p.value)),u.value=ar.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:I}),{echartRef:c,loading:m}}}),hm="",pf={class:"ecan-chart-graph",ref:"chartWrapRef"},uf={style:{width:"100%",height:"100%"},ref:"echartRef"};function ff(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",pf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",uf,null,512)]),_:1},8,["spinning"])],512)}const Qa=oe(df,[["render",ff],["__scopeId","data-v-8049fed2"]]),mf=e.defineComponent({name:"DataConfig",components:{DataGroup:td,StyleGroup:xu,ChartGraph:Qa,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:Ru,VariableGroup:ef,AButton:$.Button,ReloadOutlined:ri},setup(){var I;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(fn),i=e.inject(me),s=e.inject(Pe),d=e.inject(Cn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const A=J.cloneDeep(e.unref(a));p(A);const V=J.pick(A,J.without(Object.keys(A),"position","top","left","width","height"));he(A.type,l)?(V.height=A.height,V.width=A.width):V.height="290px";const N=J.cloneDeep(e.unref(i));return N.pageMode="design",N.componentList=s,N.preview=!0,N.pageConfig=d,{...V,graphicConfig:N,toolboxShow:!1,sourceLeft:A.left,sourceTop:A.top}});function p(A){var V,N,O,v;["#ffffff","#fff"].includes((V=A==null?void 0:A.color)==null?void 0:V.toLowerCase())&&(A.color="#000"),["#ffffff","#fff"].includes((N=A==null?void 0:A.variableColor)==null?void 0:N.toLowerCase())&&(A.variableColor="#000"),["#ffffff","#fff"].includes((O=A==null?void 0:A.increaseColor)==null?void 0:O.toLowerCase())&&(A.increaseColor="#000"),["#ffffff","#fff"].includes((v=A==null?void 0:A.declineColor)==null?void 0:v.toLowerCase())&&(A.declineColor="#000")}const u=e.computed(()=>{let A=!0;return he(e.unref(c).type,l)&&(A=!1),A}),m=e.computed(()=>{var A;return(A=e.unref(c))==null?void 0:A.type}),g=e.computed(()=>{var A;return!!((A=e.unref(c))!=null&&A.isGroupTable)}),C=A=>{const V=A==="1";V&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(V),A==="3"&&S()},f=e.ref(),w=e.inject(Me),_=e.unref(e.inject(ve)),k=(I=window==null?void 0:window.config)==null?void 0:I.pageId;function S(){var x;const{leftAxisList:A=[],rightAxisList:V=[],queryColumnList:N=[],indicators:O=[]}=e.unref(i),v=[...A,...V,...N,...O],P={};for(const F of v){const{id:L="",indexCode:j=""}=F;L&&!bt(F,"calcType")&&!P[L]&&(P[L]=j)}if((x=Object.keys(P))!=null&&x.length){const F=[];for(const L in P)F.push(new Promise((j,U)=>{w.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:L,indexCode:P[L],dataSourceId:""},{headers:{Authentication:_,operateContext:"ygt"}}).then(y=>{var D;const{success:b,data:T=[]}=y.data;b&&((D=T==null?void 0:T.dataViewColumns)!=null&&D.length)?j(T.dataViewColumns):U(T)}).catch(y=>{U(y)})}));Promise.all(F).then(L=>{if(L!=null&&L.length){const j=L.reduce((U,y)=>U.filter(b=>y.find(T=>T.typeGuid===b.typeGuid)));f.value=j.filter(U=>U.typeGuid)}})}}const h=()=>{var V;let A;r&&m.value==="table"?A=window.updateConfig:A=(V=e.unref(n))==null?void 0:V.refreshData,typeof A=="function"&&A()},E=e.inject(Se),B=()=>{var A;E({variableConditions:Bt(((A=e.unref(i))==null?void 0:A.variableList)||[],s)})};return e.provide(mn,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:g,onChange:C,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:h,refreshAction:B}}}),ym="",hf={class:"data-config"},yf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function gf(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),C=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",hf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshAction},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),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(l,{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),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_: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",yf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(C,{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 bf=oe(mf,[["render",gf],["__scopeId","data-v-d85f4e1e"]]),Cf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:bf},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:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var E;return((E=e.unref(s))==null?void 0:E.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?J.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?J.cloneDeep(e.unref(s).chartsOptions):e.ref(J.cloneDeep(wn.line));p=e.ref(p);let u=e.unref(s).tableOptions?J.cloneDeep(e.unref(s).tableOptions):e.ref(J.cloneDeep(lr));u=e.ref(u);const m=e.ref([]),g=E=>{m.value=E},C=E=>{c.value={...e.unref(c),...e.unref(E)}},f=(E,B=!0)=>{B?p.value={...e.unref(p),...e.unref(E)}:p.value={...e.unref(E)}},w=E=>{u.value={...e.unref(u),...e.unref(E)}},_=()=>m,k=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=J.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=J.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},S=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=S,t.request&&e.provide(Me,t.request),e.provide(un,{setDataList:g,getDataList:_});const h=E=>{n("updateUsedComponent",E)};return e.provide(Ye,s),e.provide(me,c),e.provide(Gt,p),e.provide(hn,u),e.provide(go,r),e.provide(fn,l),e.provide(ve,i),e.provide(Se,C),e.provide(ho,f),e.provide(yo,w),e.provide(Pe,t.renderUsedComponentList),e.provide(zt,h),e.provide(bn,t.mapAttributeProps),e.provide(Cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),gm="",wf={key:0,class:"config-modal"},kf={class:"config-modal-left"},_f={class:"config-modal-right"};function xf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",wf,[e.createElementVNode("div",kf,[e.createVNode(s)]),e.createElementVNode("div",_f,[e.createVNode(d)])]))}const Xa=pn(oe(Cf,[["render",xf],["__scopeId","data-v-23d542ce"]])),Ja=pn(Qa),Za=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ja,EcanIndicatorLibrary:Xa},Symbol.toStringTag,{value:"Module"})),Sf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Za).forEach(a=>{const r=Za[a];r.install&&t.use(r)})}};ke.EcanChartGraph=Ja,ke.EcanIndicatorLibrary=Xa,ke.default=Sf,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
58
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zr(t,o){if(t){if(typeof t=="string")return vn(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 vn(t,o)}}function vn(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 el(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function tl(t){if(Array.isArray(t))return t}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){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function ol(t,o){if(t==null)return{};var n=nl(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function nl(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Mn("#1890ff");var gt=function(o,n){var a,r=Pn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,m=ol(r,Qr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),C=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var w=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,_=Fn(p),k=Xr(_,2),S=k[0],h=k[1];return e.createVNode("span",Pn({role:"img","aria-label":s.name},m,{onClick:u,class:g}),[e.createVNode(To,{class:C,icon:s,primaryColor:S,secondaryColor:h,style:w},null)])};gt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},gt.displayName="AntdIcon",gt.inheritAttrs=!1,gt.getTwoToneColor=Kr,gt.setTwoToneColor=Mn;const be=gt;var al={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 rl=al;function jn(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){ll(t,r,n[r])})}return t}function ll(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(be,jn({},a,{icon:rl}),null)};Vo.displayName="AppstoreAddOutlined",Vo.inheritAttrs=!1;const Lo=Vo;var il={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 sl=il;function Rn(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 Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(be,Rn({},a,{icon:sl}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const dl=Bo;var pl={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 ul=pl;function Un(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){fl(t,r,n[r])})}return t}function fl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(be,Un({},a,{icon:ul}),null)};Oo.displayName="CaretRightOutlined",Oo.inheritAttrs=!1;const ml=Oo;var hl={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 yl=hl;function Gn(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 Io=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(be,Gn({},a,{icon:yl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Kt=Io;var bl={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 Cl=bl;function zn(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){wl(t,r,n[r])})}return t}function wl(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=zn({},o,n.attrs);return e.createVNode(be,zn({},a,{icon:Cl}),null)};Fo.displayName="CopyOutlined",Fo.inheritAttrs=!1;const kl=Fo;var _l={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 xl=_l;function Hn(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){Sl(t,r,n[r])})}return t}function Sl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Do=function(o,n){var a=Hn({},o,n.attrs);return e.createVNode(be,Hn({},a,{icon:xl}),null)};Do.displayName="DeleteOutlined",Do.inheritAttrs=!1;const Yn=Do;var Nl={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 Al=Nl;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){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 $o=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(be,Wn({},a,{icon:Al}),null)};$o.displayName="DoubleRightOutlined",$o.inheritAttrs=!1;const El=$o;var Vl={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=Vl;function qn(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){Bl(t,r,n[r])})}return t}function Bl(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=qn({},o,n.attrs);return e.createVNode(be,qn({},a,{icon:Ll}),null)};Mo.displayName="DownOutlined",Mo.inheritAttrs=!1;const Ol=Mo;var Il={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 Fl=Il;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){Dl(t,r,n[r])})}return t}function Dl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var vo=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(be,Kn({},a,{icon:Fl}),null)};vo.displayName="InfoCircleOutlined",vo.inheritAttrs=!1;const $l=vo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const vl=Ml;function Qn(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 Po=function(o,n){var a=Qn({},o,n.attrs);return e.createVNode(be,Qn({},a,{icon:vl}),null)};Po.displayName="MenuOutlined",Po.inheritAttrs=!1;const Xn=Po;var jl={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 Rl=jl;function Jn(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 jo=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(be,Jn({},a,{icon:Rl}),null)};jo.displayName="MinusCircleOutlined",jo.inheritAttrs=!1;const Gl=jo;var zl={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 Hl=zl;function Zn(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){Yl(t,r,n[r])})}return t}function Yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ro=function(o,n){var a=Zn({},o,n.attrs);return e.createVNode(be,Zn({},a,{icon:Hl}),null)};Ro.displayName="PlusCircleOutlined",Ro.inheritAttrs=!1;const Wl=Ro;var ql={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=ql;function ea(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){Ql(t,r,n[r])})}return t}function Ql(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=ea({},o,n.attrs);return e.createVNode(be,ea({},a,{icon:Kl}),null)};Uo.displayName="PlusOutlined",Uo.inheritAttrs=!1;const Xl=Uo;var Jl={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:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Zl=Jl;function ta(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){ei(t,r,n[r])})}return t}function ei(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=ta({},o,n.attrs);return e.createVNode(be,ta({},a,{icon:Zl}),null)};Go.displayName="QuestionCircleOutlined",Go.inheritAttrs=!1;const ti=Go;var oi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const ni=oi;function oa(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){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=oa({},o,n.attrs);return e.createVNode(be,oa({},a,{icon:ni}),null)};zo.displayName="ReloadOutlined",zo.inheritAttrs=!1;const ri=zo;var li={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 ii=li;function na(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){si(t,r,n[r])})}return t}function si(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=na({},o,n.attrs);return e.createVNode(be,na({},a,{icon:ii}),null)};Ho.displayName="SettingOutlined",Ho.inheritAttrs=!1;const ci=Ho,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:ml,CaretDownOutlined:dl,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:Tt},setup(){var E;const t=(E=window==null?void 0:window.config)==null?void 0:E.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var B;return(B=e.unref(a))==null?void 0:B.graphicConfig}),i=e.computed(()=>{var B;return(B=e.unref(r))==null?void 0:B.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const B={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const I=await o.post(`${Be}/diagram/sourceList`,B,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:A,data:V={}}=I.data;if(A){const{rows:N=[],total:O=0}=V;N==null||N.forEach(v=>{var M;v.show=!1,(M=v.dataViewColumns)==null||M.forEach(x=>{x.show=!0,x.edit=!1,x.title&&(x.label=x.title)})}),s.value=N,l.totalResult=+O}}catch{d.value=!1}},u=B=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[B],m=B=>{s.value[B].show=!s.value[B].show},g=()=>{l.currentPage=1,p()},C=J.debounce(()=>{l.currentPage=1,p()},200),f=(B,I)=>{l.pageSize=I,l.currentPage=B,p()};e.onMounted(()=>{p()});const w=e.inject(me),_=e.computed(()=>{const B=["classificationList","rowHeaderList","dimensionList"];let I=[];for(const A in e.unref(w))if(Object.prototype.hasOwnProperty.call(e.unref(w),A)&&B.includes(A)){const V=e.unref(w)[A];Array.isArray(V)&&(I=I.concat(V))}return I});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:C,onPaginationChange:f,searchText:c,setItemDisabled:(B=[])=>{let I=!1;for(const A of e.unref(_))if(!B.find(N=>N.typeGuid===A.typeGuid)){I=!0;break}return I},onDragStart:(B,I)=>{const A=I.dataViewColumns[B.oldIndex];A&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...A,dataTo:I.dataTo})),I.dataTo==="1"&&(I!=null&&I.hrpIndexVariates)&&sessionStorage.setItem("indicator-variates",JSON.stringify(I.hrpIndexVariates)))},getSourceType:B=>B==="0"?"【指标库】":B==="1"?"【视图】":"【其他】"}}}),Df="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(s,{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",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:C=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":C=>m.dataViewColumns=C,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:C=>t.onDragStart(C,m)},{item:e.withCtx(({element:C})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(C.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(C.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{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 Ci=oe(di,[["render",bi],["__scopeId","data-v-237f17b8"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:fr},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=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(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),aa={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},sortList:{type:Array,default:()=>[]}},components:{Draggable:Tt,AModal:$.Modal,AButton:$.Button,ASelect:$.Select,ASelectOption:$.SelectOption,DeleteOutlined:Yn},setup(t,{expose:o}){var V;const n=(V=window==null?void 0:window.config)==null?void 0:V.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(me),s=e.inject(Se),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=e.ref("1"),u=e.ref([]),m=N=>{const O=t.sortList.filter(M=>!e.unref(u).find(x=>x.columnName===M.name)||N.columnName===M.name),v=[];return O.forEach((M,x)=>{v.includes(M.name)?M.name=`${M.name}_ecanrepeat_${x}`:v.push(M.name)}),O},g=async()=>{try{const N=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:O,data:v=[]}=N.data;O&&(c.value=v==null?void 0:v.slice(0,200))}catch(N){console.error(N)}},C=()=>{var x,F;const N=((x=e.unref(i)[t.type])==null?void 0:x.slice())||[],O=N[t.index],{label:v,name:M}=t.item;e.unref(p)==="2"?O.sort={label:v,columnName:M,type:"CUSTOM",customOrderColumns:e.unref(c)}:e.unref(p)==="1"&&((F=e.unref(u))!=null&&F.length?O.sort=J.cloneDeep(e.unref(u)):delete O.sort),s({[t.type]:N})};let f=!1;const w=()=>{f=!0},_=e.ref(!1),k=N=>{var v;const{sort:O}=N;O?Array.isArray(O)?(p.value=((v=O[0])==null?void 0:v.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=J.cloneDeep(O):u.value=[]):(p.value=(O==null?void 0:O.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=[J.cloneDeep(O)]:u.value=[]):u.value=[],_.value=!0},S=()=>{_.value=!1},h=()=>{e.unref(p)==="2"?(f&&C(),f=!1):C(),S()};return o({showModal:k}),e.watch(_,N=>{var O,v;if(N){const M=(v=(O=t.item)==null?void 0:O.sort)==null?void 0:v.customOrderColumns;M==null?g():c.value=M}else c.value=[];window.changeShowTable&&window.changeShowTable(!N)},{flush:"post"}),{visible:_,customSortList:c,activeKey:p,combSortList:u,getSortOptions:m,onChange:w,onDeleteConfig:()=>{var v;const N=((v=e.unref(i)[t.type])==null?void 0:v.slice())||[],O=N[t.index];delete O.sort,s({[t.type]:N}),S()},onCancel:h,onAddSort:()=>{e.unref(u).push({label:"",columnName:null,type:"COMBINATION",order:null})},handleDeleteSort:N=>{u.value.splice(N,1)},onColumnChange:N=>{const O=e.unref(u).find(v=>v.columnName===N);if(O){const v=t.sortList.find(M=>M.name===N);v&&(O.label=v.label,v.defaultCode?O.defaultCode=v.defaultCode:delete O.defaultCode)}}}}}),$f="",Si={class:"button-wrapper"},Ni={class:"list-wrapper"},Ai={class:"button-wrapper"},Ti={class:"sort-item"};function Ei(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("delete-outlined"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("draggable"),m=e.resolveComponent("a-tabs"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(g,{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.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[1]||(o[1]=C=>t.activeKey=C)},{default:e.withCtx(()=>[e.createVNode(p,{key:"1",tab:"组合排序"},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createVNode(s,{primary:"",onClick:t.onAddSort},{default:e.withCtx(()=>[e.createTextVNode(" 新增 ")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.combSortList,(C,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sort-row",key:f},[e.createVNode(d,{value:C.columnName,"onUpdate:value":w=>C.columnName=w,style:{width:"200px"},placeholder:"维度/指标",options:t.getSortOptions(C),fieldNames:{label:"label",value:"name"},onChange:t.onColumnChange},null,8,["value","onUpdate:value","options","onChange"]),e.createVNode(d,{value:C.order,"onUpdate:value":w=>C.order=w,style:{"margin-left":"10px",width:"100px"},placeholder:"升/降序"},{default:e.withCtx(()=>[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})]),_:2},1032,["value","onUpdate:value"]),e.createVNode(c,{style:{color:"red","margin-left":"10px"},onClick:w=>t.handleDeleteSort(f)},null,8,["onClick"])]))),128))])]),_:1}),e.createVNode(p,{key:"2",tab:"自定义排序","force-render":""},{default:e.withCtx(()=>[e.createElementVNode("div",Ai,[e.createVNode(s,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(u,{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",Ti,e.toDisplayString(C),1)]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["visible","onCancel"])}const Vi=oe(xi,[["render",Ei],["__scopeId","data-v-9cc29c60"]]),Li=e.defineComponent({name:"CustomGroupModal",directives:{focus:aa},components:{CloseOutlined:Kt,AModal:$.Modal,ASelect:$.Select,ASelectOption:$.SelectOption,AButton:$.Button,AInput:$.Input,ACheckbox:$.Checkbox,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ATag:$.Tag,ACheckableTag:$.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(Me),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(ve));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const y=e.unref(c).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(c).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){$.message.error("创建分组名不能空");return}e.unref(p).has(y)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:y,data:[]}),i=!0)},C=y=>{e.unref(c).splice(y,1),i=!0},f=e.ref(null),w=()=>{if(e.unref(m)===0){$.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[y]){$.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const P=e.unref(c)[D];e.unref(c)[D].data=P.data.filter(z=>(z.checked&&b.push({...z,checked:!1}),!z.checked))}e.unref(c)[y].data=[...b,...e.unref(c)[y].data],i=!0},_=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},S=(y,b)=>{const T=y.target.value;e.unref(p).has(T)&&$.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},h=e.inject(me),E=e.inject(Se),B=e.computed(()=>e.unref(h).source),I=e.computed(()=>e.unref(h).dataViewId),A=e.ref(!1),V=()=>{var K,Q;const y=e.unref(c);let b="";e.unref(A)&&(b=(K=y[0])==null?void 0:K.title);const T=y==null?void 0:y.length,D={};for(let ee=1;ee<T;ee++){const ae=y[ee]||{},{title:ge,data:ye}=ae;D[ge]=(ye==null?void 0:ye.map(Ve=>Ve.label))||[]}const P=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],z=P[t.index];z.customGroup={groupInfoMap:D,otherGroupName:b},E({[t.type]:P})},N=e.ref(!1),O=()=>{N.value=!0},v=()=>{N.value=!1},M=()=>{v(),i&&V(),i=!1},x=()=>{i=!0},F=new Set,L=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,T=y.groupInfoMap;(b===""||b==null)&&(A.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const P in T)if(Object.prototype.hasOwnProperty.call(T,P)){const K=T[P].map(Q=>(F.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:P,data:K},D++}await j()},j=async()=>{var y;try{const b=await n.post(`${Be}/diagram/groupvalue`,{source:e.unref(B),dataViewId:e.unref(I),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const P=[];(y=D==null?void 0:D.slice(0,200))==null||y.forEach(z=>{F.has(z)||P.push({label:z,checked:!1})}),e.unref(c)[0].data=P}}catch(b){console.error(b)}};return e.watch(N,y=>{y&&L(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),o({showModal:O}),{visible:N,title:s,activeKey:l,customGroupList:c,onCancel:M,useOtherGroup:A,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:C,onMoveInGroup:w,selectGroupIndex:f,onEditTitle:_,onTitleChange:S,onFinishEditTitle:k,onUseOtherGroup:x,customGroupEditTitleList:u}}}),Mf="",vf="",Bi={class:"custom-group-header"},Oi={class:"move-and-create"},Ii={class:"select-tip"},Fi={class:"select-count"},Di={class:"create-group"},$i={class:"custom-group-content"},Mi=["onClick"],vi={class:"extra"},Pi={class:"custom-group-list"},ji={class:"text"};function Ri(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),C=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),w=e.resolveComponent("a-modal"),_=e.resolveDirective("focus");return e.openBlock(),e.createBlock(w,{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",Bi,[e.createElementVNode("div",Oi,[e.createElementVNode("div",null,[e.createElementVNode("span",Ii,[e.createTextVNode(" 已选"),e.createElementVNode("span",Fi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,S)=>(e.openBlock(),e.createBlock(s,{key:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Di,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",$i,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,S)=>(e.openBlock(),e.createBlock(C,{key:S},{header:e.withCtx(()=>[t.customGroupEditTitleList[S]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,S),onBlur:h=>t.onFinishEditTitle(S),onPressEnter:h=>t.onFinishEditTitle(S)},null,8,["value","onChange","onBlur","onPressEnter"])),[[_]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(S),["prevent","stop"])},e.toDisplayString(k.title),9,Mi))]),extra:e.withCtx(()=>[e.createElementVNode("div",vi,[S===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),S!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(S),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,E)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":B=>h.checked=B,class:"custom-group",key:E},{default:e.withCtx(()=>[e.createElementVNode("span",ji,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Ui=oe(Li,[["render",Ri],["__scopeId","data-v-7e3049d2"]]);let _e=(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};var Gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo={},zi={get exports(){return Yo},set exports(t){Yo=t}};(function(t,o){(function(n,a){t.exports=a()})(Gi,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(zi);const Hi=Yo;de.extend(Hi);const Yi=e.defineComponent({name:"Condition",components:{CloseOutlined:Kt,DownOutlined:Ol,AppstoreAddOutlined:Lo,ASelect:$.Select,AInput:$.Input,ADatePicker:$.DatePicker,AButton:$.Button,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem,ASubMenu:$.SubMenu,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,ARadioGroup:$.RadioGroup,ARadio:$.Radio,AInputNumber:$.InputNumber,ASelectOption:$.SelectOption,MenuOutlined:Xn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var ct,dt,At,pt,Le,Qe,tt,ot,Re,ut,ft,mt,nt;const o=(ct=window==null?void 0:window.config)==null?void 0:ct.pageId,n=e.inject(me),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(gn),s=e.inject(Pe),d=e.ref(!1),l=de(),c=e.computed(()=>{var Y;const H=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:ne="",id:Z="",type:ce}=X;ce==="ecanRangePicker"?H.push({value:`${Z}-startTime`,label:`${ne||Z}-开始时间值`,keyName:`${ne||Z}-startTime`,id:Z},{value:`${Z}-endTime`,label:`${ne||Z}-结束时间值`,keyName:`${ne||Z}-endTime`,id:Z}):H.push({value:Z,label:`${ne||Z}`,keyName:`${ne||Z}`,id:Z})}),H}),p=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.dataViewId}),u=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},C=[{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"}],f=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:""}]),_=[{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"}],S=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(dt=t.data)==null?void 0:dt.fieldName,fieldType:(At=t.data)==null?void 0:At.fieldType,rule:(pt=t.data)==null?void 0:pt.rule,id:(Le=t.data)==null?void 0:Le.id,fieldValue:E(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(Re=t.data)==null?void 0:Re.indexCodeNum,dataType:((ut=t.data)==null?void 0:ut.dataType)||"",componentId:((ft=t.data)==null?void 0:ft.componentId)||"",useCurrentTime:!!((mt=t.data)!=null&&mt.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function E(){const{fieldType:H="",dataType:Y="",fieldValue:X=""}=t.data;if(H==="DATE"&&Y==="time")return X&&de(X);if(Y==="component"){const ne=e.unref(c).find(Z=>Z.keyName===X);return ne?ne.value:X}else return X}const B=e.ref(!1),I=e.computed(()=>h.value.fieldType==="DATE"),A=e.computed(()=>{const H=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ne=["controlList","sqlConditions","variableList","variableConditions"];if(X.includes(H)){let Z=[];for(const ce in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ce)&&!ne.includes(ce)){const xe=e.unref(n)[ce];Array.isArray(xe)&&(X.includes(ce)?Z=Z.concat(xe.filter(at=>at.show)):Z=Z.concat(xe))}Y=Z}else["leftAxisList","rightAxisList","indicators"].includes(H)&&(Y=e.unref(i));return Y.map(Z=>({...Z,label:Z.title||Z.label,value:Z.name}))}),{updateCondition:V,deleteCondition:N,addCondition:O}=e.inject(yn,{updateCondition:(H,Y,X)=>{},deleteCondition:(H,Y)=>{},addCondition:(H,Y,X)=>{}}),v=()=>{N(t.index,t.path)};e.watch(h,H=>{const Y=J.cloneDeep(H);H.fieldType==="DATE"&&H.dataType!=="component"&&H.fieldValue&&(Y.fieldValue=H.fieldValue.format(H.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,H=>{h.value.fieldValue="",h.value.useCurrentTime=H});const M=H=>{var G;const Y=e.unref(A).find(W=>W.value===H)||{},{name:X,genericType:ne,id:Z,label:ce,typeGuid:xe,indexCode:at,indexCodeNum:R}=Y;h.value={id:Z,fieldName:X,fieldType:ne,label:ce,rule:"",fieldValue:ne==="DATE"?null:void 0,targetSource:"",typeGuid:xe,indexCode:at,indexCodeNum:R,dataType:"",useCurrentTime:!1,keyValue:((G=e.unref(h))==null?void 0:G.keyValue)||_e()}},x=H=>{const Y=e.unref(c).find(X=>X.value===H)||{};e.unref(h).componentId=Y.id||""},F=e.computed(()=>{const H=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),H==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:H==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:H==="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"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),L=e.computed(()=>{let H="";const Y=e.unref(F).find(X=>X.value===e.unref(h).rule);return Y&&(H=Y.label),H}),j=e.computed(()=>{let H={fontSize:"12px"};return e.unref(L)||(H={...H,position:"absolute",right:"11px",top:"9px"}),H}),U=e.ref([]),y=async()=>{var H;if(!(e.unref(U).length>0))try{const Y=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:ne=[]}=Y.data;X&&(U.value=(H=ne==null?void 0:ne.slice(0,200))==null?void 0:H.map(Z=>({label:Z,value:Z})))}catch(Y){console.error(Y)}},b=H=>{e.unref(h).rule=H,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(H)&&y()},T=H=>{e.unref(h).dataType=H,e.unref(h).fieldValue=""},D=e.ref(),P=H=>{D.value=H,e.unref(h).fieldValue=(H==null?void 0:H.join(","))||""},z=H=>{const{keyPath:Y}=H;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var ne,Z,ce,xe,at,R,G,W;if(h.value.dataType=((ne=t.data)==null?void 0:ne.dataType)||"",h.value.componentId=((Z=t.data)==null?void 0:Z.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(xe=t.data)==null?void 0:xe.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((at=t.data)==null?void 0:at.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const re=e.unref(h).calcWays[0];if(re){const te=re.split("-");e.unref(f).expression=te[0],e.unref(f).around=te[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((R=t.data)==null?void 0:R.radioValue)||"";const re=e.unref(w).find(te=>{var le;return te.key===((le=t.data)==null?void 0:le.activeKey)});re&&Ve(re,t.data)}}else D.value=((W=(G=t.data)==null?void 0:G.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:H,fieldName:Y,rule:X}=h.value;H!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=H=>{if(e.unref(h).activeKey===H){e.unref(w)[H].radioValue=e.unref(h).radioValue,e.unref(w)[e.unref(h).activeKey]&&(e.unref(w)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(w)[H].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(w)[H].afterNum=e.unref(h).calcWays[0]));return}e.unref(w).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(H,Y)=>{m.value=!0;const X=H.target.value,ne=Y.type,Z=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),xe=Y.afterNum;Y.value=se(X,ne,Z,ce,xe)},ee=H=>{const Y=e.unref(h).activeKey;if(H!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const ne=e.unref(h).dateFormat,Z=e.unref(h).radioValue;let ce=0,xe=0;return Z==="1"?ce=Math.abs(e.unref(h).calcWays[0]):Z==="2"&&(xe=e.unref(h).calcWays[0]),se(Z,X,ne,ce,xe)},ae=(H,Y,X,ne)=>{if(m.value=!0,Y.radioValue===ne){const Z=H.target.value;X==="+"?Y.value=de().add(Z,Y.type).format(e.unref(h).dateFormat):Y.value=de().subtract(Z,Y.type).format(e.unref(h).dateFormat)}},ge=(H,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=H.radioValue,H.radioValue==="1"?e.unref(h).calcWays[0]="-"+H.beforeNum:H.radioValue==="2"?e.unref(h).calcWays[0]=H.afterNum:H.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":H.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),B.value=!1},ye=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,B.value=!1};function Ve(H,Y){const{radioValue:X="",calcWays:ne=[]}=Y;H.radioValue=X,ne!=null&&ne.length&&(X==="1"?H.beforeNum=Math.abs(ne[0]):X==="2"&&(H.afterNum=ne[0]))}function se(H,Y,X,ne,Z){if(H==="1")return de().subtract(ne,Y).format(X);if(H==="2")return de().add(Z,Y).format(X);if(H==="3"){if(Y==="years")return de().startOf("year").format(X);if(Y==="quarters")return de().startOf("quarter").format(X);if(Y==="months")return de().startOf("month").format(X);if(Y==="days")return de().format(X)}else if(H==="4"){if(Y==="years")return de().endOf("year").format(X);if(Y==="quarters")return de().endOf("quarter").format(X);if(Y==="months")return de().endOf("month").format(X)}return""}const Ce=(H,Y)=>Y.label.toLowerCase().indexOf(H.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:A,ruleOptions:F,onFieldChange:M,condition:h,valueOptions:U,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:P,fieldValues:D,onDelete:v,isDateType:I,formatList:C,tabDateList:w,compareList:_,menuRule:k,dateBtnLabel:L,downIconStyle:j,popoverVisible:B,dateRadioStyle:g,showTime:m,controlList:c,dataTypeList:S,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:z,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:ae,okDatePickConfig:ge,onChangeComponent:x,filterOption:Ce,okCustomConfig:ye,clickConditionMenu:({key:H})=>{O(t.path,t.index,H==="2"?"||":"&&")}}}}),Pf="",jf="",Wi={class:"condition"},qi=["title"],Ki={class:"rule"},Qi={class:"data-type"},Xi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Ji={class:"popover-content-wrap"},Zi={key:0,class:"use-current-time"},es={class:"tabFilterRadio"},ts={key:0},os={key:1},ns={style:{"margin-left":"10px"}},as={style:{"margin-left":"10px"}},rs={style:{position:"absolute",bottom:"10px"}},ls={style:{display:"flex"}},is={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),C=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),w=e.resolveComponent("a-input-number"),_=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),S=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),E=e.resolveComponent("appstore-add-outlined"),B=e.resolveComponent("a-popover"),I=e.resolveComponent("a-input"),A=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Wi,[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,(N,O)=>(e.openBlock(),e.createBlock(s,{key:O,value:N.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:N.label},e.toDisplayString(N.label),9,qi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Ki,[t.isDateType?(e.openBlock(),e.createBlock(g,{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,N=>(e.openBlock(),e.createBlock(c,{key:N.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value?"color: #1890FF;":"")},e.toDisplayString(N.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,O=>{var v;return e.openBlock(),e.createBlock(c,{key:O.value,disabled:O.value==="component"&&!((v=t.controlList)!=null&&v.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value&&t.condition.dataType===O.value?"color: #1890FF;":"")},e.toDisplayString(O.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,M=>(e.openBlock(),e.createBlock(l,{key:M.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value&&t.condition.dataType===O.value&&t.condition.dateFormat===M.value?"color: #1890FF;":"")},e.toDisplayString(M.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(u,{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",Qi,[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,(N,O)=>(e.openBlock(),e.createBlock(s,{key:O,value:N.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Xi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(C,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(C,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=N=>t.condition.fieldValue=N),format:t.condition.dateFormat},null,8,["value","format"]))],64)):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]=N=>t.condition.fieldValue=N),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(B,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=N=>t.popoverVisible=N),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Ji,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Zi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=N=>t.isUseCurrentTime=N)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(N,O)=>(e.openBlock(),e.createBlock(S,{key:O,tab:N.label},{default:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(k,{value:N.radioValue,"onUpdate:value":v=>N.radioValue=v,onChange:v=>t.changeRadioValue(v,N)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ts,"相对当前时间:"+e.toDisplayString(N.value),1)):(e.openBlock(),e.createElementBlock("div",os,"相对当前时间:"+e.toDisplayString(t.getFieldValue(O)),1)),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(w,{value:N.beforeNum,"onUpdate:value":v=>N.beforeNum=v,min:0,onBlur:v=>t.blurCompare(v,N,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ns,e.toDisplayString(N.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(w,{value:N.afterNum,"onUpdate:value":v=>N.afterNum=v,min:0,onBlur:v=>t.blurCompare(v,N,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",as,e.toDisplayString(N.afterLabel),1)]),_:2},1032,["style"]),N.beforeText?(e.openBlock(),e.createBlock(_,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),N.afterText?(e.openBlock(),e.createBlock(_,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=v=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:v=>t.okDatePickConfig(N,O)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(S,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=N=>t.customTabData.expression=N),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=N=>t.customTabData.unit=N),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=N=>t.customTabData.around=N)},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",is,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=N=>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[8]||(o[8]=N=>{t.popoverVisible=!0})},[e.createVNode(E)])]),_: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"])):(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=N=>t.condition.fieldValue=N),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(I,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=N=>t.condition.fieldValue=N)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(A,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const cs=oe(Yi,[["render",ss],["__scopeId","data-v-d10a7ca9"]]),ds=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:cs}}),Rf="",ps={key:0,class:"condition-list"},us={key:0,class:"condition-container"},fs={key:0,class:"condition-text"},ms={key:1,class:"condition-text"},hs={class:"conditions"};function ys(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",us,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",fs,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",ms,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",hs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const gs=oe(ds,[["render",ys],["__scopeId","data-v-553c1496"]]),bs=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:$.Select,AInput:$.Input,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=J.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),Uf="",ra=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Cs={class:"truncations"},ws={class:"rule"},ks={class:"field-value"},_s={class:"field-value"},xs=ra(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ss=ra(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ns=["onClick"];function As(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Cs,[(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",ws,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ks,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",_s,[xs,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ss]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ns)]))),128))])}const Ts=oe(bs,[["render",As],["__scopeId","data-v-f543c690"]]),he=(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},Es=t=>t.replace(/\\n/g,`
59
+ `),bt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},la=(t,o)=>{var f;const n=J.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;sa(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const w of m){const _=Je((w==null?void 0:w.conditions)||[]);if(_!=null&&_.length){const k=_.filter(S=>ca(S,o)?(S==null?void 0:S.dataType)==="component":!1).map(S=>{const h=ca(S,o),E={};return S!=null&&S.dateFormat&&(E.format=S.dateFormat),{conditionKey:S.fieldName,conditionLabel:S.fieldName,conditionName:S.fieldName,conditionValueType:S.fieldType,id:h.id,keyName:S.fieldValue,rule:S.rule,notGlobal:!0,indexCode:S.indexCode,typeGuid:S.typeGuid,indexCodeNum:S.indexCodeNum,...E}});if(k!=null&&k.length)for(const S of k)g.find(h=>h.keyName===S.keyName)||g.push(S)}}const C=g.length;for(let w=0;w<C;w++){const _=g[w];if(_&&!((f=Object.keys(_))!=null&&f.length)||(_==null?void 0:_.conditionKey)==="parentCode")continue;const{id:k,keyName:S,prop:h,format:E,dataType:B="component",customValue:I}=_,A=ia(_);Wo({sqlCondition:A,renderUsedComponents:o,id:k,dateFormat:E,prop:h,keyName:S,dataType:B,customValue:I}),u.push(A)}for(let w=u.length-1;w>=0;w--){const _=u[w];_.globalCondition||Je(u).find(S=>S.alias===_.alias&&S.globalCondition)&&u.splice(w,1)}return u},Bt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Wo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function ia(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Vs=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function sa(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)sa(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=ia(n);Wo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Vs)delete n[p]}}function Wo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,m=n.find(S=>S.id===a),{value:g,format:C="YYYY-MM-DD",operate:f,type:w="",useCurrentTime:_}=m||{},k=r||C;if(he(w,"date")){let S;if(_?S=de():S=de(g),f&&g){const{mode:h,type:E,value:B}=f;if(B)switch(E){case"add":S=S.add(B,h);break;case"minus":S=S.subtract(B,h);break}}if(c&&p&&u)switch(u){case"add":S=S.add(c,p);break;case"minus":S=S.subtract(c,p);break}o.fieldValue=(S==null?void 0:S.format(k))||"",o.dateFormat=k}else if(w==="ecanRangePicker"){const{interval:S,intervalUnit:h,startTime:E,endTime:B}=m||{};let I=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(I=V[V.length-1])}if(!I)return;let A=null;if(_&&(I==="startTime"?A=de().subtract(S,h):I==="endTime"&&(A=de())),m[I]&&(A=de(m[I])),f){const{type:V,value:N,mode:O}=f;switch(V){case"add":A=A&&A.add(N,O);break;case"minus":A=A&&A.subtract(N,O)}}if(c&&p&&u){if(c==="rangeValue"){if(E&&B){const V=de(B).diff(de(E),p)+1;switch(u){case"add":A=A&&A.add(V,p);break;case"minus":A=A&&A.subtract(V,p)}}}else if(!isNaN(+c))switch(u){case"add":A=A&&A.add(c,p);break;case"minus":A=A&&A.subtract(c,p)}}if(A&&(o.fieldValue=A==null?void 0:A.format(k)),I==="rangeValue"&&E&&B){const V=Ls(k);V&&(o.fieldValue=de(B).diff(de(E),V)+1)}o.dateFormat=k}else{const S=g&&g.match(/\{(.+?)\}/g);S!=null&&S.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=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 ca(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}function Ls(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Bs=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:gs,TruncationList:Ts,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var M;const n=e.ref("1"),a=()=>{var x;return`添加过滤条件-${((x=t.item)==null?void 0:x.label)||""}`},r=e.inject(me),i=e.inject(Se),s=e.inject(Pe),d=e.computed(()=>{var x;return(x=e.unref(r))==null?void 0:x.dataSourceId}),l=e.inject(Ye),c=e.inject(zt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=x=>{var F;for(const L of x)(F=L.conditions)!=null&&F.length?g(L.conditions):L.keyValue=_e()};e.watch(m,x=>{var F,L,j,U;if(x){if(Array.isArray((F=t.item)==null?void 0:F.conditions)){const y=J.cloneDeep(((L=t.item)==null?void 0:L.conditions)||[]);g(y),p.value=y}Array.isArray((j=t.item)==null?void 0:j.truncations)?u.value=J.cloneDeep((U=t.item)==null?void 0:U.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!x)},{flush:"post"});let C=!1;const f=x=>{var F;C=!0,e.unref(p)==null||((F=e.unref(p))==null?void 0:F.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==x?p.value=[{join:x,conditions:[e.unref(p)[0],{keyValue:_e()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===x&&p.value[0].conditions.push({keyValue:_e()}))};e.provide(yn,{updateCondition(x,F,L){var y;C=!0;let j=e.unref(p);const U=L.split("-");if(U!=null&&U.length)for(const b of U)if(j[b])j=(y=j[b])==null?void 0:y.conditions;else break;Array.isArray(j)&&j[F]&&(j[F]=x)},deleteCondition(x,F){var U,y,b;C=!0;let L=e.unref(p);const j=F.split("-");if(j!=null&&j.length){for(const T of j)if(L[T])L=(U=L[T])==null?void 0:U.conditions;else break;if(Array.isArray(L)&&L[x])if(L.splice(x,1),L.length===1){if(j.length>0){const T=j.length-1,D=j[T],P=j.slice(0,T);let z=e.unref(p),K="";for(const Q of P)if(z[Q])K=(y=z[Q])==null?void 0:y.join,z=(b=z[Q])==null?void 0:b.conditions;else break;if(K===L[0].join){if(Array.isArray(L[0].conditions)){const Q=J.cloneDeep(L[0].conditions);z.splice(+D,1),z.splice(+D,0,...Q)}}else z[D]=L[0]}}else L.length===0&&(p.value=[])}},addCondition(x,F,L){var b,T;C=!0;let j=e.unref(p),U="";const y=x.split("-");if(y!=null&&y.length){for(const D of y)if(j[D])U=(b=j[D])==null?void 0:b.join,j=(T=j[D])==null?void 0:T.conditions;else break;if(U===L)j.splice(F+1,0,{keyValue:_e()});else{const D=J.cloneDeep(j[F]);j[F]={join:L,conditions:[D,{keyValue:_e()}]}}}}});const w=x=>{C=!0,u.value=x},_=e.computed(()=>{var F;const x=[];return(F=e.unref(s))==null||F.forEach(L=>{const{keyName:j="",id:U="",type:y}=L;y==="ecanRangePicker"?x.push({value:`${U}-startTime`,label:`${j||U}-开始时间值`,keyName:`${j||U}-startTime`},{value:`${U}-endTime`,label:`${j||U}-结束时间值`,keyName:`${j||U}-endTime`}):x.push({value:U,label:`${j||U}`,keyName:`${j||U}`})}),x}),k=()=>{var b,T,D;const x=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),F=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],L=Je(J.cloneDeep(F[t.index].conditions));F[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(F[t.index].truncations=e.unref(u));const j=Je(e.unref(p));for(const P of j)if(P.dataType==="component"&&P.fieldValue){const z=e.unref(_).find(K=>K.value===P.fieldValue);z&&(P.fieldValue=z.keyName)}const U=L.filter(P=>!j.find(z=>z.componentId===P.componentId)).filter(P=>!x.find(z=>z.id===P.componentId)),y=j.filter(P=>!L.find(z=>z.componentId===P.componentId));S(U,y),i({[t.type]:F,sqlConditions:la({...e.unref(r),[t.type]:F},e.unref(s))})};function S(x,F){var j;const L=x.map(U=>({...U,delete:!0})).concat(F.map(U=>({...U,add:!0})));for(const U of L){const y=e.unref(s).find(b=>b.id===U.componentId);if(y){const{type:b,id:T,events:D=[]}=y,P=Qt(b);if(U.add)D.find(z=>{var K;return z.on===P&&z.target===((K=e.unref(l))==null?void 0:K.id)&&z.emit==="refreshData"})||c({id:T,events:[...D,{on:P,target:(j=e.unref(l))==null?void 0:j.id,emit:"refreshData"}].reverse()});else if(U.delete){const z=D.findIndex(K=>{var Q;return K.on===P&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});z!==-1&&(D.splice(z,1),c({id:T,events:D}))}}}}const h=()=>{m.value=!0},E=()=>{p.value=[],m.value=!1},B=()=>{C&&k(),C=!1,E()},I=()=>{E()},A=e.inject(Me),V=e.unref(e.inject(ve)),N=(M=window==null?void 0:window.config)==null?void 0:M.pageId,O=e.ref([]);e.provide(gn,O);const v=async x=>{var F;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:L,indexCode:j}=x,U=await A.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:N,dataSourceId:e.unref(d),indexGuid:L,indexCode:j},{headers:{Authentication:V,operateContext:"ygt"}}),{success:y,data:b=[]}=U.data;y&&((F=b==null?void 0:b.dataViewColumns)!=null&&F.length)&&(O.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(L){console.error(L)}};return e.watch(()=>t.item,x=>{x&&m.value&&v(x)}),o({showModal:h}),{visible:m,onOk:B,onCancel:I,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:w,activeKey:n}}}),Gf="",Os={class:"header"},Is={class:"header"};function Fs(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",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(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{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(l,{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",Is,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{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 Ds=oe(Bs,[["render",Fs],["__scopeId","data-v-498bb1e7"]]),$s=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:$.Input,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(Se),i=e.ref(),s=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),zf="",Ms=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),vs={class:"config-name"},Ps=Ms(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function js(t,o,n,a,r,i){const s=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",vs,[Ps,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Rs=oe($s,[["render",js],["__scopeId","data-v-de6a1755"]]),Us=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(Se),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(zt),l=e.ref(),c=e.computed(()=>{var _;return(_=e.unref(i))==null?void 0:_.filter(k=>k.keyName!=="")});let p=[];const u=_=>{const{sortCpnts:k=[]}=_;p=J.cloneDeep(k),l.value=J.cloneDeep(k),n.value=!0},m=()=>{n.value=!1},g=()=>{var E,B;const _=Je(((E=e.unref(a))==null?void 0:E.controlList)||[]),k=p.filter(I=>!e.unref(l).includes(I)).filter(I=>!_.find(A=>A.id===I)),S=e.unref(l).filter(I=>!p.includes(I)).filter(I=>!_.find(A=>A.id===I)),h=k.map(I=>({componentId:I,delete:!0})).concat(S.map(I=>({componentId:I,add:!0})));for(const I of h){const A=e.unref(i).find(V=>V.id===I.componentId);if(A){const{type:V,id:N,events:O=[]}=A,v=Qt(V);if(I.add)O.find(M=>{var x;return M.on===v&&M.target===((x=e.unref(s))==null?void 0:x.id)&&M.emit==="refreshData"})||d({id:N,events:[...O,{on:v,target:(B=e.unref(s))==null?void 0:B.id,emit:"refreshData"}].reverse()});else if(I.delete){const M=O.findIndex(x=>{var F;return x.on===v&&x.target===((F=e.unref(s))==null?void 0:F.id)&&x.emit==="refreshData"});M!==-1&&(O.splice(M,1),d({id:N,events:O}))}}}},C=()=>{var k;g();const _=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];_[t.index].sortCpnts=l.value,r({[t.type]:_}),m()},f=()=>{m()},w=(_,k)=>{var S;return(S=k==null?void 0:k.keyName)==null?void 0:S.toLowerCase().includes(_==null?void 0:_.toLowerCase())};return o({showModal:u}),{visible:n,onOk:C,onCancel:f,idFilterOption:w,fieldName:l,usedComponentList:c}}}),Hf="",Gs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),zs={class:"sort-by-cpnt"},Hs=Gs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function Ys(t,o,n,a,r,i){const s=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",zs,[Hs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),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 Ws=oe(Us,[["render",Ys],["__scopeId","data-v-08af1ef8"]]),qs=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(Se),i=e.ref(),s=e.ref([]),d=(m,g)=>{const{dimByCount:C=""}=m;i.value=C,s.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var C;return(C=g==null?void 0:g.label)==null?void 0:C.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),Yf="",Ks=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),Qs={class:"dim-by-count"},Xs=Ks(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Js(t,o,n,a,r,i){const s=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",Qs,[Xs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Zs=oe(qs,[["render",Js],["__scopeId","data-v-e8608437"]]),qo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:qo(t,r.children)&&(n=qo(t,r.children)))}return n},ec=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:$.Row,ACol:$.Col,ATextarea:$.Textarea,APopover:$.Popover,AInputSearch:$.InputSearch,ATree:$.Tree,ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(me),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(V==null?void 0:V.filter(N=>{var O;return N.id!==((O=t.item)==null?void 0:O.id)}))||[]:V||[]}),u=e.computed(()=>s.value.filter(V=>!V.randomKey)),m=e.computed({get:()=>t.value||"",set:V=>{o("update:value",V),o("change",V)}}),g=e.ref("1"),C=e.ref(""),f=V=>{const N=document.getElementById("calTextArea");let O=m.value;if(document.selection){const v=document.selection.createRange();v.text=V}else if(typeof N.selectionStart=="number"&&typeof N.selectionEnd=="number"){const v=N.selectionStart,M=N.selectionEnd;let x=v;O=O.substring(0,v)+V+O.substring(M,O.length),x+=V.length,N.selectionStart=N.selectionEnd=x}else O+=V;m.value=O},w=["+","-","*","/","(",")"],_=(V,N)=>{let O="";switch(N){case"name":{O="${"+V+"}";break}case"function":{O=V+"()";break}default:O=V}f(O)},k=[],S=e.ref([]),h=e.ref(!0),E=e.ref([]),B=V=>{var N;for(const O of V)(N=O==null?void 0:O.children)!=null&&N.length?B(O.children):k.push({key:O.key,title:O.title})},I=async()=>{try{const V=await n.get(`${Be}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:N,data:O=[]}=V.data;N&&(O!=null&&O.length)&&(B(O),E.value=O)}catch(V){console.error(V)}},A=V=>{S.value=V,h.value=!1};return e.watch(C,V=>{const N=k.map(O=>O.title.indexOf(V)>-1?qo(O.key,E.value):null).filter((O,v,M)=>O&&M.indexOf(O)===v);S.value=N,C.value=V,h.value=!0}),e.onMounted(()=>{I()}),{fieldList:p,varList:u,myValue:m,calculMethods:w,funcDescsData:E,searchFuncValue:C,expandedKeys:S,autoExpandParent:h,activeKey:g,selectedElem:_,onExpand:A}}}),Wf="",qf="",tc={class:"formula-calculation"},oc={class:"field-area"},nc={style:{"text-align":"center",padding:"10px 0"}},ac=["onClick"],rc=["onClick"],lc={class:"cal_right_bottom"},ic={class:"cal_fu"},sc=["onClick"],cc={class:"function-wrap"},dc={class:"wrap-search"},pc={class:"tree-box"},uc={key:0},fc={style:{color:"#f50"}},mc={key:1},hc=["onClick"],yc={class:"cal_a"};function gc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),C=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",tc,[e.createVNode(C,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",oc,[e.createElementVNode("div",nc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:_=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,ac))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:_=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,rc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",lc,[e.createElementVNode("ul",ic,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:_=>t.selectedElem(f,"symbol"),key:w},e.toDisplayString(f),9,sc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",cc,[e.createElementVNode("div",dc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",pc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:w})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",uc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",fc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",mc,e.toDisplayString(f),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:_=>t.selectedElem(f,"function")},"插入",8,hc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",yc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const bc=oe(ec,[["render",gc],["__scopeId","data-v-ba051d9b"]]),Cc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:bc,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:ti},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(Pe),a=e.inject(me),r=e.inject(Se),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const M=["leftAxisList","rightAxisList","queryColumnList","indicators"];let x=[];for(const F of M)Object.prototype.hasOwnProperty.call(e.unref(a),F)&&(x=x.concat(e.unref(a)[F]));return x}),l={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},m=e.ref({}),g=e.ref(),C=e.ref(!1),f=e.ref();e.watch(C,M=>{if(M)if(t.mode==="edit"){const{label:x,calcType:F,formula:L,builtInValueSource:j,builtInFormula:U,builtInCalcWay:y}=t.item;if(f.value={label:x,calcType:F,formula:L,builtInValueSource:j,builtInFormula:U,builtInCalcWay:y},U==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=J.cloneDeep(p),m.value=J.cloneDeep(u));else f.value=J.cloneDeep(p),m.value=J.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!M)},{immediate:!0,deep:!0});let w=!1;const _=()=>{w=!0},k=M=>{const x=e.unref(i).find(F=>F.id===M);x&&(f.value.builtInCalcWay=x.keyName),w=!0},S=()=>{var j;const M=((j=e.unref(a)[t.type])==null?void 0:j.slice())||[],{label:x,builtInFormula:F}=e.unref(f)||{},L={};if(F==="DATE_OFFSET"&&(L.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const U=_e();M.push({...e.unref(f),...L,id:U,show:!0,name:x})}else t.mode==="edit"&&(M[t.index]={...M[t.index],...e.unref(f),...L,name:x});r({[t.type]:M})},h=()=>{C.value=!0},E=()=>{C.value=!1},B=async(M,x)=>{if(x==="")return Promise.reject(new Error("请输入指标名"));{const F=e.unref(d).find(L=>L.label===x);return F?F.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},I=e.computed(()=>{let M={label:[{required:!0,validator:B,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(M={...M,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),M}),A=()=>{g.value.validate().then(()=>{w&&S(),w=!1,E()})},V=()=>{g.value.clearValidate(),E()},N=()=>{w=!0,e.unref(f).builtInCalcWay=""},O=e.computed(()=>{let M="";const x=e.unref(f).builtInCalcWay,F=e.unref(f).builtInValueSource;if(!F||!x)return M;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{x==="ASC"?M="【"+F+"】由小到大在所有值中的排名":M="【"+F+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{M=`所有【】的
60
+ `,x==="ASC"?M=M+"【"+F+"】由小到大的组内的排名":M=M+"【"+F+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let L="";switch(x){case"SUM":{L="求和";break}case"AVG":{L="求平均值";break}case"MIN":{L="求最小值";break}case"MAX":{L="求最大值";break}}M="将所有【"+F+"】"+L;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let L="";switch(M=`所有【】的
61
+ `,x){case"SUM":{L="求和";break}case"AVG":{L="求平均值";break}case"MIN":{L="求最小值";break}case"MAX":{L="求最大值";break}}M=M+"将所有【"+F+"】"+L;break}}return M}),v=(M,x)=>x.keyName.toLowerCase().indexOf(M.toLowerCase())>=0;return o({showModal:h}),{visible:C,onCancel:V,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:A,onChange:_,formRules:I,accessLogic:O,formRef:g,onChangeBuiltInFormula:N,componentList:i,onChangeComponent:k,filterOption:v,offsetConfig:m}}}),Kf="",Qf="",wc={key:0,class:"accesstip"},kc={style:{display:"flex","align-items":"center"}};function _c(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),C=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),w=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(w,{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(f,{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(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=_=>t.formState.label=_),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]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{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]=_=>t.formState.formula=_),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","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]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{value:"DATE_OFFSET"},{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]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:_.label,disabled:t.mode==="edit"&&t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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]=_=>t.formState.builtInCalcWay=_),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(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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",wc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],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]=_=>t.formState.builtInValueSource=_),"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),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=_=>t.offsetConfig.value=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=_=>t.offsetConfig.unit=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=_=>t.offsetConfig.around=_),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(C,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const xc=oe(Cc,[["render",_c],["__scopeId","data-v-33575cd9"]]),Sc=e.defineComponent({name:"DataConfigCard",directives:{focus:aa},components:{CalculationModal:xc,FilterModal:Ds,CustomGroupModal:Ui,SettingOutlined:ci,DeleteOutlined:Yn,CopyOutlined:kl,InfoCircleOutlined:$l,CustomSortModal:Vi,PlusOutlined:Xl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:Tt,ConfigName:Rs,SortByCpnt:Ws,DimByCount:Zs},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(me),a=e.inject(Se),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(R={})=>{var q;const{type:G}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(R.scope)?i.includes(G)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(R.scope)&&s.includes(G)&&(W=!0),G==="dimensionList"){const ie=((q=e.unref(n)[G])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(R="{}")=>{var G,W;try{const q=JSON.parse(R);if(!c(q))return;const ie=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!he(e.unref(ce).type,["list","circulate","scatter"])||e.unref(p))&&ie.forEach(te=>{te.show=!1}),g(ie,q),q.randomKey=_e(),ie.push(q);const re={};if(["IDX","BUILT_IN_IDX"].includes(q.scope)){let te=[];const le=sessionStorage.getItem("indicator-variates");if(le){const ue=JSON.parse(le);if(ue!=null&&ue.length){te=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const pe of ue)te.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:_e()})}}re.variableList=te,re.variableConditions=Bt(te,r)}a({[t.type]:ie,...re}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(R="{}")=>{var G;try{const{cardItem:W,type:q,index:ie}=JSON.parse(R);if(!c(W)||q===t.type)return;const re=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];g(re,W),re.push(W);const te=e.unref(n)[q].slice()||[];te.splice(ie,1),a({[t.type]:re,[q]:te})}catch(W){console.error(W)}};function g(R,G){const W=[];if(R.forEach(q=>{q.label.includes(G.label)&&W.push(q.label.split(G.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){G.label=G.label+q;break}}}const C=(R,G)=>{var ie,re;const W=(ie=R.target)==null?void 0:ie.checked,q=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!he(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(te=>{te.show=!1}),q[G].show=W,a({[t.type]:q})},f=R=>{var W;const G=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];G.splice(R,1),a({[t.type]:G})},w=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const R=sessionStorage.getItem("indicator-list-item"),G=sessionStorage.getItem("indicator-card-item");R?u(R):G&&m(G)},k=R=>{var le,ue;const{newIndex:G,oldIndex:W,from:q,to:ie}=R,re=q.id,te=ie.id;if(G>=0&&W>=0){if(re===te){const pe=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=pe.splice(W,1)[0];He&&(pe.splice(G,0,He),a({[t.type]:pe}))}else if(t.type===te){const pe=((ue=e.unref(n)[te])==null?void 0:ue.slice())||[];if(pe!=null&&pe.length){const He=pe.splice(pe.length-1,1)[0];He&&(pe.splice(G,0,He),a({[t.type]:pe}))}}}},S=(R,G)=>{const W=R.oldIndex,q=G[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(n)[t.type]||[]),E=e.ref([]);let B=!1;e.watch(()=>e.unref(h).length,R=>{E.value=new Array(R).fill(!1)},{flush:"post",immediate:!0});const I=R=>{var W,q,ie;const G=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=G[R])!=null&&q.randomKey){const re=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let te=re.length-1;te>=0;te--)re[te].randomKey===G[R].randomKey&&re.splice(te,1);a({variableConditions:Bt(re,r),variableList:re})}G.splice(R,1),a({[t.type]:G})},A=R=>{E.value[R]=!0},V=()=>{B=!0},N=(R,G,W)=>{var q,ie,re,te;if(E.value[G]=!1,B){const le=(q=R.target)==null?void 0:q.value,ue=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],pe=ue.filter(fe=>{var we;return(we=fe==null?void 0:fe.formula)==null?void 0:we.includes(W)}).map(fe=>fe.id),He=ue.filter(fe=>{var we;return(we=fe==null?void 0:fe.builtInValueSource)==null?void 0:we.includes(W)}).map(fe=>fe.id);if(pe!=null&&pe.length)for(const fe of pe){const we=ue.find(ht=>ht.id===fe);we.formula=we.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const fe of He){const we=ue.find(ht=>ht.id===fe);we.builtInValueSource=we.builtInValueSource.replaceAll(W,le)}if(ue[G].label=le,(re=ue[G])!=null&&re.randomKey){const fe=((te=e.unref(n))==null?void 0:te.variableList)||[],we=fe.filter(ht=>ht.randomKey===ue[G].randomKey);we!=null&&we.length&&we.forEach(ht=>{ht.label=le}),a({variableConditions:Bt(fe,r),variableList:fe})}a({[t.type]:ue})}B=!1},O="DEFAULT",v=e.computed(()=>{const R=[],{scope:G,label:W}=e.unref(l)||{};let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(G)&&(q=q.filter(le=>le.label===W)),G==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=J.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,R.push(le)}const{leftAxisList:ie=[],rightAxisList:re=[],indicators:te=[]}=e.unref(n)||{};return[...q,...R,...ie,...re,...te]}),M=(R={},G,W="ASC")=>{var ue;const{label:q,name:ie,id:re,defaultCode:te}=R,le=((ue=e.unref(n)[t.type])==null?void 0:ue.slice())||[];re===O?delete le[G].sort:le[G].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:te},a({[t.type]:le})},x=(R={},G="ASC")=>{const q={ASC:"升序",DESC:"降序"}[G],{sort:ie}=R,{label:re,order:te}=ie||{};return re&&te===G?`${q}(${re})`:q},F=e.ref(),L=e.ref(),j=e.ref(),U=e.ref(),y=(R={},G)=>{var W;F.value=R,L.value=G,(W=e.unref(j))==null||W.showModal(R)},b=R=>"排序"+(R!=null&&R.sort?"(已配置)":""),T=(R={},G)=>{var W;F.value=R,L.value=G,(W=e.unref(U))==null||W.showModal()},D=R=>"自定义分组"+((R==null?void 0:R.customGroup)!=null?"(已配置)":""),P=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],z=[{name:"是",value:1},{name:"否",value:0}],K=(R,G)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[G].aggregate=R,a({[t.type]:W})},Q=(R,G)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[G].distinct=R,a({[t.type]:W})},ee=(R,G)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[G].dateFormat=R,a({[t.type]:W})},ae=(R="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[R]})`,ge=R=>`是否去重(${{0:"否",1:"是"}[R]||"否"})`,ye=(R={})=>{var G;return"过滤"+(R!=null&&R.conditions&&((G=R==null?void 0:R.conditions)==null?void 0:G.length)>0?"(已配置)":"")},Ve=e.ref(),se=e.ref(),Ce=e.ref(),et=e.ref(),mo=(R={},G)=>{F.value=R,L.value=G,e.unref(Ve).showModal()},ct=(R={},G)=>{F.value=R,L.value=G,e.unref(se).showModal(R)},dt=(R={},G)=>{F.value=R,L.value=G,e.unref(Ce).showModal(R)},At=(R={},G)=>{F.value=R,L.value=G,e.unref(et).showModal(R,e.unref(Y))},pt=e.ref(),Le=e.ref("add"),Qe=(R,G,W)=>{var q;Le.value=R,R==="edit"&&(F.value=G,L.value=W),(q=e.unref(pt))==null||q.showModal()},tt=e.inject(Me),ot=e.unref(e.inject(ve)),Re=e.ref([]),ut=e.computed(()=>e.unref(n)[t.type]||{});e.watch(n,()=>{var R;he(e.unref(ce).type,"scatter")&&((R=e.unref(n))!=null&&R.indicators)&&(Re.value=e.unref(n).indicators.map(G=>({label:G.label,value:G.label})))});const ft=async()=>{if(!he(e.unref(ce).type,"scatter"))try{const R=await tt.post(`${Be}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:G,data:W=[]}=R.data;G&&(e.unref(n).selectFieldOptions=W||[],Re.value=W)}catch(R){console.error(R)}},mt=(R,G)=>{const W=e.unref(n)[t.type]||{};W[G]=R,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],H=e.ref({}),Y=e.ref([]),X=async(R,G)=>{var q;const{name:W}=G;if(!nt.includes(t.type)&&R&&bt(G,"indexCode")){const ie=await tt.post(`${Be}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:G.id,indexCode:G.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:re,data:te}=ie.data;re&&te&&(Y.value=(te==null?void 0:te.dataViewColumns)||[],H.value[W]={name:te.name,code:te.indexCode})}},ne=R=>{l.value=R},Z=R=>{const G=document.createElement("input");document.body.appendChild(G),G.setAttribute("value",R),G.select(),document.execCommand("copy"),document.body.removeChild(G),$.message.success("复制成功")},ce=e.inject(Ye),xe=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),at=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?Re.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ft())}),{onCheckboxChange:C,onDropEnd:f,onDragItemEnd:w,onDragItemAdd:_,onDragItemSort:k,onDragItemStart:S,cardItemList:h,onDelete:I,onEdit:A,onCommitLabelChange:N,sortList:v,onSort:M,handleSortTitle:x,showCustomSortModal:y,customSortModalRef:j,currentItem:F,currentIndex:L,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:U,showCustomGroupModal:T,editLabelList:E,onLabelChange:V,aggregateList:P,distinctList:z,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:ae,handleDistinctTitle:ge,onShowCalculationModal:Qe,handleFilterTitle:ye,filterModalRef:Ve,configNameRef:se,sortByCpntRef:Ce,dimByCountRef:et,showFilterModal:mo,calculationModalRef:pt,calculationModalMode:Le,formatList:o,fieldOptions:Re,fieldData:ut,onFieldChange:mt,onVisibleChange:X,onClickSetting:ne,copyDataViewName:Z,dataViewMap:H,isShowConfigName:xe,showConfigNameModal:ct,dimensionType:nt,isShowSortByCpnt:at,showSortByCpntModal:dt,dataSelectIndicators:p,showDimByCountModal:At,selectedComponent:ce}}}),Xf="",Jf="",rt=t=>(e.pushScopeId("data-v-10465d01"),t=t(),e.popScopeId(),t),Nc={class:"title"},Ac={class:"title-text"},Tc={class:"field-wrap"},Ec={class:"field-item"},Vc=rt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Lc={class:"field-item"},Bc=rt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Oc={key:0,class:"field-item"},Ic=rt(()=>e.createElementVNode("div",{class:"item-label",style:{width:"20px"}},null,-1)),Fc={class:"title"},Dc={class:"title-text"},$c=rt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Mc=rt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),vc={class:"card-item-wrap"},Pc={class:"card-item-inner"},jc=["onClick"],Rc=["onClick"],Uc=["onClick"],Gc={style:{display:"flex","align-items":"center"}},zc=["title"],Hc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Yc={style:{display:"flex","align-items":"center"}},Wc=["title"],qc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Kc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-checkbox"),l=e.resolveComponent("a-card"),c=e.resolveComponent("info-circle-outlined"),p=e.resolveComponent("a-popover"),u=e.resolveComponent("plus-outlined"),m=e.resolveComponent("a-input"),g=e.resolveComponent("setting-outlined"),C=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-menu-divider"),w=e.resolveComponent("a-sub-menu"),_=e.resolveComponent("copy-outlined"),k=e.resolveComponent("a-menu"),S=e.resolveComponent("a-dropdown"),h=e.resolveComponent("delete-outlined"),E=e.resolveComponent("draggable"),B=e.resolveComponent("custom-sort-modal"),I=e.resolveComponent("custom-group-modal"),A=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),N=e.resolveComponent("sort-by-cpnt"),O=e.resolveComponent("dim-by-count"),v=e.resolveComponent("calculation-modal"),M=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(l,{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",Nc,[e.createElementVNode("div",Ac,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Tc,[e.createElementVNode("div",Ec,[Vc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=x=>t.onFieldChange(x,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Lc,[Bc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=x=>t.onFieldChange(x,"valueField"))},null,8,["value","options"])]),t.selectedComponent.type==="ecanSelect"?(e.openBlock(),e.createElementBlock("div",Oc,[Ic,e.createVNode(d,{checked:t.fieldData.hasAllOption,"onUpdate:checked":o[2]||(o[2]=x=>t.fieldData.hasAllOption=x)},{default:e.withCtx(()=>[e.createTextVNode(" 显示【全部】选项 ")]),_:1},8,["checked"])])):e.createCommentVNode("",!0)])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(l,{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",Fc,[e.createElementVNode("div",Dc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(p,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[$c]),default:e.withCtx(()=>[e.createVNode(c,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[3]||(o[3]=e.withModifiers(x=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(u,{class:"add-calculation-icon"}),Mc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(E,{modelValue:t.cardItemList,"onUpdate:modelValue":o[4]||(o[4]=x=>t.cardItemList=x),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[5]||(o[5]=x=>t.onDragItemStart(x,t.cardItemList))},{item:e.withCtx(({element:x,index:F})=>[e.createElementVNode("div",vc,[e.createVNode(d,{class:"card-item",checked:x.show,onChange:L=>t.onCheckboxChange(L,F)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[!t.editLabelList[F]&&x.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(L=>t.onEdit(F),["prevent","stop"])},e.toDisplayString(x.label),9,jc)):e.createCommentVNode("",!0),!t.editLabelList[F]&&!x.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(L=>t.onEdit(F),["prevent","stop"])}," 请点击填入名字 ",8,Rc)):e.createCommentVNode("",!0),t.editLabelList[F]?e.withDirectives((e.openBlock(),e.createBlock(m,{key:2,"default-value":x.label,size:"small",onBlur:L=>t.onCommitLabelChange(L,F,x.label),onPressEnter:L=>t.onCommitLabelChange(L,F,x.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[M]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(x.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(L=>t.onShowCalculationModal("edit",x,F),["prevent","stop"])}," fx ",8,Uc)):e.createCommentVNode("",!0),e.createVNode(S,{trigger:["click"],onVisibleChange:L=>t.onVisibleChange(L,x)},{overlay:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{onClick:L=>t.showCustomSortModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(C,{onClick:L=>t.showCustomGroupModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(f),x.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,L=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:L.value,onClick:j=>t.onDateFormatChange(L.value,F)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(x.dateFormat===L.value||!x.dateFormat&&L.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(L.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(C,{onClick:L=>t.showFilterModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(f),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(x.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,L=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:L.value,onClick:j=>t.onAggregateChange(L.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(C,{onClick:L=>t.showConfigNameModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(C,{onClick:L=>t.showSortByCpntModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),x.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(C,{onClick:L=>t.showDimByCountModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(w,{title:t.handleDistinctTitle(x.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,L=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:L.value,onClick:j=>t.onDistinctChange(L.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[x.name]?(e.openBlock(),e.createBlock(C,{key:0,onClick:L=>t.copyDataViewName(t.dataViewMap[x.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Gc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[x.name].name},[Hc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[x.name].name),1)],8,zc),e.createVNode(_,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[x.name]?(e.openBlock(),e.createBlock(C,{key:1,onClick:L=>t.copyDataViewName(t.dataViewMap[x.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Yc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[x.name].code},[qc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[x.name].code),1)],8,Wc),e.createVNode(_,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(g,{class:"setting-icon",onClick:L=>t.onClickSetting(x)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(h,{class:"delete-icon",onClick:e.withModifiers(L=>t.onDelete(F),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(B,{item:t.currentItem,index:t.currentIndex,type:t.type,sortList:t.sortList,ref:"customSortModalRef"},null,8,["item","index","type","sortList"]),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(A,{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(N,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(O,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(v,{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 Qc=oe(Sc,[["render",Kc],["__scopeId","data-v-10465d01"]]),Xc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},Jc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Qc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(Se),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var w,_;const l=J.cloneDeep((w=e.unref(t))==null?void 0:w.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["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"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"],scatter:["classificationList","indicators","formFields"]},u="ecan";let m=e.unref(o);if(m.startsWith(u)){const k=u.length;m=((_=m.slice(k,k+1))==null?void 0:_.toLowerCase())+m.slice(k+1)}const g=p[m],C=Xc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const S=g[k];if(!S)break;r.push({...C[S],type:S})}for(const k of c)s(l,k)&&!g.find(S=>S===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Zf="",em="",Zc={class:"data-group"};function ed(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const td=oe(Jc,[["render",ed],["__scopeId","data-v-e486502c"]]),od=[{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"]}],nd={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"}},ad=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:$.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function rd(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const ld=oe(ad,[["render",rd]]),id=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:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),i=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?o("change",u):o("change",`${u}${m}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function sd(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{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},u)=>(e.openBlock(),e.createBlock(s,{key:u,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},u)=>(e.openBlock(),e.createBlock(s,{key:u,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 da=oe(id,[["render",sd]]),cd=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:$.RadioGroup,ARadioButton:$.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function dd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const pd=oe(cd,[["render",dd]]),ud=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function fd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const md=oe(ud,[["render",fd]]),hd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:$.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function yd(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const gd=oe(hd,[["render",yd]]);var Ne="top",Ie="bottom",Fe="right",Ae="left",Ko="auto",Ot=[Ne,Ie,Fe,Ae],Ct="start",It="end",bd="clippingParents",pa="viewport",Ft="popper",Cd="reference",ua=Ot.reduce(function(t,o){return t.concat([o+"-"+Ct,o+"-"+It])},[]),fa=[].concat(Ot,[Ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ct,o+"-"+It])},[]),wd="beforeRead",kd="read",_d="afterRead",xd="beforeMain",Sd="main",Nd="afterMain",Ad="beforeWrite",Td="write",Ed="afterWrite",Vd=[wd,kd,_d,xd,Sd,Nd,Ad,Td,Ed];function Ue(t){return t?(t.nodeName||"").toLowerCase():null}function Ee(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function lt(t){var o=Ee(t).Element;return t instanceof o||t instanceof Element}function De(t){var o=Ee(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Qo(t){if(typeof ShadowRoot>"u")return!1;var o=Ee(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ld(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!De(i)||!Ue(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Bd(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],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!De(r)||!Ue(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Od={name:"applyStyles",enabled:!0,phase:"write",fn:Ld,effect:Bd,requires:["computeStyles"]};function Ge(t){return t.split("-")[0]}var it=Math.max,Xt=Math.min,wt=Math.round;function Xo(){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 ma(){return!/^((?!chrome|android).)*safari/i.test(Xo())}function kt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&De(t)&&(r=t.offsetWidth>0&&wt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&wt(a.height)/t.offsetHeight||1);var s=lt(t)?Ee(t):window,d=s.visualViewport,l=!ma()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:c+u,bottom:p+m,left:c,x:c,y:p}}function Jo(t){var o=kt(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 ha(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Qo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Ee(t).getComputedStyle(t)}function Id(t){return["table","td","th"].indexOf(Ue(t))>=0}function Ze(t){return((lt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Ue(t)==="html"?t:t.assignedSlot||t.parentNode||(Qo(t)?t.host:null)||Ze(t)}function ya(t){return!De(t)||qe(t).position==="fixed"?null:t.offsetParent}function Fd(t){var o=/firefox/i.test(Xo()),n=/Trident/i.test(Xo());if(n&&De(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Qo(r)&&(r=r.host);De(r)&&["html","body"].indexOf(Ue(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Dt(t){for(var o=Ee(t),n=ya(t);n&&Id(n)&&qe(n).position==="static";)n=ya(n);return n&&(Ue(n)==="html"||Ue(n)==="body"&&qe(n).position==="static")?o:n||Fd(t)||o}function Zo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $t(t,o,n){return it(t,Xt(o,n))}function Dd(t,o,n){var a=$t(t,o,n);return a>n?n:a}function ga(){return{top:0,right:0,bottom:0,left:0}}function ba(t){return Object.assign({},ga(),t)}function Ca(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var $d=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ba(typeof o!="number"?o:Ca(o,Ot))};function Md(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ge(n.placement),l=Zo(d),c=[Ae,Fe].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=$d(r.padding,n),m=Jo(i),g=l==="y"?Ne:Ae,C=l==="y"?Ie:Fe,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],w=s[l]-n.rects.reference[l],_=Dt(i),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=f/2-w/2,h=u[g],E=k-m[p]-u[C],B=k/2-m[p]/2+S,I=$t(h,B,E),A=l;n.modifiersData[a]=(o={},o[A]=I,o.centerOffset=I-B,o)}}function vd(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)||ha(o.elements.popper,r)&&(o.elements.arrow=r))}const Pd={name:"arrow",enabled:!0,phase:"main",fn:Md,effect:vd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _t(t){return t.split("-")[1]}var jd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Rd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:wt(n*r)/r||0,y:wt(a*r)/r||0}}function wa(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=s.x,g=m===void 0?0:m,C=s.y,f=C===void 0?0:C,w=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=w.x,f=w.y;var _=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),S=Ae,h=Ne,E=window;if(c){var B=Dt(n),I="clientHeight",A="clientWidth";if(B===Ee(n)&&(B=Ze(n),qe(B).position!=="static"&&d==="absolute"&&(I="scrollHeight",A="scrollWidth")),B=B,r===Ne||(r===Ae||r===Fe)&&i===It){h=Ie;var V=u&&B===E&&E.visualViewport?E.visualViewport.height:B[I];f-=V-a.height,f*=l?1:-1}if(r===Ae||(r===Ne||r===Ie)&&i===It){S=Fe;var N=u&&B===E&&E.visualViewport?E.visualViewport.width:B[A];g-=N-a.width,g*=l?1:-1}}var O=Object.assign({position:d},c&&jd),v=p===!0?Rd({x:g,y:f},Ee(n)):{x:g,y:f};if(g=v.x,f=v.y,l){var M;return Object.assign({},O,(M={},M[h]=k?"0":"",M[S]=_?"0":"",M.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",M))}return Object.assign({},O,(o={},o[h]=k?f+"px":"",o[S]=_?g+"px":"",o.transform="",o))}function Ud(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ge(o.placement),variation:_t(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,wa(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:s,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,wa(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Gd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ud,data:{}};var Zt={passive:!0};function zd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Ee(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Hd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zd,data:{}};var Yd={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return Yd[o]})}var Wd={start:"end",end:"start"};function ka(t){return t.replace(/start|end/g,function(o){return Wd[o]})}function en(t){var o=Ee(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function tn(t){return kt(Ze(t)).left+en(t).scrollLeft}function qd(t,o){var n=Ee(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=ma();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+tn(t),y:l}}function Kd(t){var o,n=Ze(t),a=en(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=it(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=it(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+tn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=it(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function on(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function _a(t){return["html","body","#document"].indexOf(Ue(t))>=0?t.ownerDocument.body:De(t)&&on(t)?t:_a(Jt(t))}function Mt(t,o){var n;o===void 0&&(o=[]);var a=_a(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Ee(a),s=r?[i].concat(i.visualViewport||[],on(a)?a:[]):a,d=o.concat(s);return r?d:d.concat(Mt(Jt(s)))}function nn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Qd(t,o){var n=kt(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 xa(t,o,n){return o===pa?nn(qd(t,n)):lt(o)?Qd(o,n):nn(Kd(Ze(t)))}function Xd(t){var o=Mt(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&De(t)?Dt(t):t;return lt(a)?o.filter(function(r){return lt(r)&&ha(r,a)&&Ue(r)!=="body"}):[]}function Jd(t,o,n,a){var r=o==="clippingParents"?Xd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=xa(t,c,a);return l.top=it(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=it(p.left,l.left),l},xa(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Sa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ge(a):null,i=a?_t(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Ne:l={x:s,y:o.y-n.height};break;case Ie:l={x:s,y:o.y+o.height};break;case Fe:l={x:o.x+o.width,y:d};break;case Ae:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Zo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case Ct:l[c]=l[c]-(o[p]/2-n[p]/2);break;case It:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function vt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?bd:d,c=n.rootBoundary,p=c===void 0?pa:c,u=n.elementContext,m=u===void 0?Ft:u,g=n.altBoundary,C=g===void 0?!1:g,f=n.padding,w=f===void 0?0:f,_=ba(typeof w!="number"?w:Ca(w,Ot)),k=m===Ft?Cd:Ft,S=t.rects.popper,h=t.elements[C?k:m],E=Jd(lt(h)?h:h.contextElement||Ze(t.elements.popper),l,p,s),B=kt(t.elements.reference),I=Sa({reference:B,element:S,strategy:"absolute",placement:r}),A=nn(Object.assign({},S,I)),V=m===Ft?A:B,N={top:E.top-V.top+_.top,bottom:V.bottom-E.bottom+_.bottom,left:E.left-V.left+_.left,right:V.right-E.right+_.right},O=t.modifiersData.offset;if(m===Ft&&O){var v=O[r];Object.keys(N).forEach(function(M){var x=[Fe,Ie].indexOf(M)>=0?1:-1,F=[Ne,Ie].indexOf(M)>=0?"y":"x";N[M]+=v[F]*x})}return N}function Zd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?fa:l,p=_t(a),u=p?d?ua:ua.filter(function(C){return _t(C)===p}):Ot,m=u.filter(function(C){return c.indexOf(C)>=0});m.length===0&&(m=u);var g=m.reduce(function(C,f){return C[f]=vt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ge(f)],C},{});return Object.keys(g).sort(function(C,f){return g[C]-g[f]})}function ep(t){if(Ge(t)===Ko)return[];var o=eo(t);return[ka(t),o,ka(o)]}function tp(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,C=g===void 0?!0:g,f=n.allowedAutoPlacements,w=o.options.placement,_=Ge(w),k=_===w,S=l||(k||!C?[eo(w)]:ep(w)),h=[w].concat(S).reduce(function(z,K){return z.concat(Ge(K)===Ko?Zd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:C,allowedAutoPlacements:f}):K)},[]),E=o.rects.reference,B=o.rects.popper,I=new Map,A=!0,V=h[0],N=0;N<h.length;N++){var O=h[N],v=Ge(O),M=_t(O)===Ct,x=[Ne,Ie].indexOf(v)>=0,F=x?"width":"height",L=vt(o,{placement:O,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),j=x?M?Fe:Ae:M?Ie:Ne;E[F]>B[F]&&(j=eo(j));var U=eo(j),y=[];if(i&&y.push(L[v]<=0),d&&y.push(L[j]<=0,L[U]<=0),y.every(function(z){return z})){V=O,A=!1;break}I.set(O,y)}if(A)for(var b=C?3:1,T=function(K){var Q=h.find(function(ee){var ae=I.get(ee);if(ae)return ae.slice(0,K).every(function(ge){return ge})});if(Q)return V=Q,"break"},D=b;D>0;D--){var P=T(D);if(P==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const op={name:"flip",enabled:!0,phase:"main",fn:tp,requiresIfExists:["offset"],data:{_skip:!1}};function Na(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 Aa(t){return[Ne,Fe,Ie,Ae].some(function(o){return t[o]>=0})}function np(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=vt(o,{elementContext:"reference"}),d=vt(o,{altBoundary:!0}),l=Na(s,a),c=Na(d,r,i),p=Aa(l),u=Aa(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ap={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:np};function rp(t,o,n){var a=Ge(t),r=[Ae,Ne].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[Ae,Fe].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function lp(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=fa.reduce(function(p,u){return p[u]=rp(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const ip={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lp};function sp(t){var o=t.state,n=t.name;o.modifiersData[n]=Sa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const cp={name:"popperOffsets",enabled:!0,phase:"read",fn:sp,data:{}};function dp(t){return t==="x"?"y":"x"}function pp(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,m=n.tether,g=m===void 0?!0:m,C=n.tetherOffset,f=C===void 0?0:C,w=vt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),_=Ge(o.placement),k=_t(o.placement),S=!k,h=Zo(_),E=dp(h),B=o.modifiersData.popperOffsets,I=o.rects.reference,A=o.rects.popper,V=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,N=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),O=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,v={x:0,y:0};if(B){if(i){var M,x=h==="y"?Ne:Ae,F=h==="y"?Ie:Fe,L=h==="y"?"height":"width",j=B[h],U=j+w[x],y=j-w[F],b=g?-A[L]/2:0,T=k===Ct?I[L]:A[L],D=k===Ct?-A[L]:-I[L],P=o.elements.arrow,z=g&&P?Jo(P):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ga(),Q=K[x],ee=K[F],ae=$t(0,I[L],z[L]),ge=S?I[L]/2-b-ae-Q-N.mainAxis:T-ae-Q-N.mainAxis,ye=S?-I[L]/2+b+ae+ee+N.mainAxis:D+ae+ee+N.mainAxis,Ve=o.elements.arrow&&Dt(o.elements.arrow),se=Ve?h==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,Ce=(M=O==null?void 0:O[h])!=null?M:0,et=j+ge-Ce-se,mo=j+ye-Ce,ct=$t(g?Xt(U,et):U,j,g?it(y,mo):y);B[h]=ct,v[h]=ct-j}if(d){var dt,At=h==="x"?Ne:Ae,pt=h==="x"?Ie:Fe,Le=B[E],Qe=E==="y"?"height":"width",tt=Le+w[At],ot=Le-w[pt],Re=[Ne,Ae].indexOf(_)!==-1,ut=(dt=O==null?void 0:O[E])!=null?dt:0,ft=Re?tt:Le-I[Qe]-A[Qe]-ut+N.altAxis,mt=Re?Le+I[Qe]+A[Qe]-ut-N.altAxis:ot,nt=g&&Re?Dd(ft,Le,mt):$t(g?ft:tt,Le,g?mt:ot);B[E]=nt,v[E]=nt-Le}o.modifiersData[a]=v}}const up={name:"preventOverflow",enabled:!0,phase:"main",fn:pp,requiresIfExists:["offset"]};function fp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function mp(t){return t===Ee(t)||!De(t)?en(t):fp(t)}function hp(t){var o=t.getBoundingClientRect(),n=wt(o.width)/t.offsetWidth||1,a=wt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function yp(t,o,n){n===void 0&&(n=!1);var a=De(o),r=De(o)&&hp(o),i=Ze(o),s=kt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Ue(o)!=="body"||on(i))&&(d=mp(o)),De(o)?(l=kt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=tn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function gp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function bp(t){var o=gp(t);return Vd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Cp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function wp(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 Ta={placement:"bottom",modifiers:[],strategy:"absolute"};function Ea(){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 kp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Ta:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ta,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(_){var k=typeof _=="function"?_(p.options):_;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:lt(d)?Mt(d):d.contextElement?Mt(d.contextElement):[],popper:Mt(l)};var S=bp(wp([].concat(a,p.options.modifiers)));return p.orderedModifiers=S.filter(function(h){return h.enabled}),C(),g.update()},forceUpdate:function(){if(!m){var _=p.elements,k=_.reference,S=_.popper;if(Ea(k,S)){p.rects={reference:yp(k,Dt(S),p.options.strategy==="fixed"),popper:Jo(S)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(N){return p.modifiersData[N.name]=Object.assign({},N.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var E=p.orderedModifiers[h],B=E.fn,I=E.options,A=I===void 0?{}:I,V=E.name;typeof B=="function"&&(p=B({state:p,options:A,name:V,instance:g})||p)}}}},update:Cp(function(){return new Promise(function(w){g.forceUpdate(),w(p)})}),destroy:function(){f(),m=!0}};if(!Ea(d,l))return g;g.setOptions(c).then(function(w){!m&&c.onFirstUpdate&&c.onFirstUpdate(w)});function C(){p.orderedModifiers.forEach(function(w){var _=w.name,k=w.options,S=k===void 0?{}:k,h=w.effect;if(typeof h=="function"){var E=h({state:p,name:_,instance:g,options:S}),B=function(){};u.push(E||B)}})}function f(){u.forEach(function(w){return w()}),u=[]}return g}}var _p=[Hd,cp,Gd,Od,ip,op,up,Pd,ap],xp=kp({defaultModifiers:_p});function an(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 Va(t,o){if(t){if(typeof t=="string")return an(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)?an(t,o):void 0}}function Sp(t){return function(o){if(Array.isArray(o))return an(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Va(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 xt(t){return xt=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},xt(t)}function La(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Ba(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){La(i,a,r,s,d,"next",l)}function d(l){La(i,a,r,s,d,"throw",l)}s(void 0)})}}var Oa={exports:{}},Ia={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})(Ia),function(t){var o=Ia.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(y,b,T){y[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,T){return Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,T,D){return b[T]=D}}function g(y,b,T,D){var P=b&&b.prototype instanceof h?b:h,z=Object.create(P.prototype),K=new j(D||[]);return d(z,"_invoke",{value:M(y,T,K)}),z}function C(y,b,T){try{return{type:"normal",arg:y.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var f="suspendedStart",w="suspendedYield",_="executing",k="completed",S={};function h(){}function E(){}function B(){}var I={};m(I,c,function(){return this});var A=Object.getPrototypeOf,V=A&&A(A(U([])));V&&V!==i&&s.call(V,c)&&(I=V);var N=B.prototype=h.prototype=Object.create(I);function O(y){["next","throw","return"].forEach(function(b){m(y,b,function(T){return this._invoke(b,T)})})}function v(y,b){function T(P,z,K,Q){var ee=C(y[P],y,z);if(ee.type!=="throw"){var ae=ee.arg,ge=ae.value;return ge&&o(ge)=="object"&&s.call(ge,"__await")?b.resolve(ge.__await).then(function(ye){T("next",ye,K,Q)},function(ye){T("throw",ye,K,Q)}):b.resolve(ge).then(function(ye){ae.value=ye,K(ae)},function(ye){return T("throw",ye,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function(P,z){function K(){return new b(function(Q,ee){T(P,z,Q,ee)})}return D=D?D.then(K,K):K()}})}function M(y,b,T){var D=f;return function(P,z){if(D===_)throw new Error("Generator is already running");if(D===k){if(P==="throw")throw z;return{value:a,done:!0}}for(T.method=P,T.arg=z;;){var K=T.delegate;if(K){var Q=x(K,T);if(Q){if(Q===S)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===f)throw D=k,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=_;var ee=C(y,b,T);if(ee.type==="normal"){if(D=T.done?k:w,ee.arg===S)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=k,T.method="throw",T.arg=ee.arg)}}}function x(y,b){var T=b.method,D=y.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,x(y,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),S;var P=C(D,y.iterator,b.arg);if(P.type==="throw")return b.method="throw",b.arg=P.arg,b.delegate=null,S;var z=P.arg;return z?z.done?(b[y.resultName]=z.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,S):z:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,S)}function F(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function L(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function j(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(F,this),this.reset(!0)}function U(y){if(y||y===""){var b=y[c];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,D=function P(){for(;++T<y.length;)if(s.call(y,T))return P.value=y[T],P.done=!1,P;return P.value=a,P.done=!0,P};return D.next=D}}throw new TypeError(o(y)+" is not iterable")}return E.prototype=B,d(N,"constructor",{value:B,configurable:!0}),d(B,"constructor",{value:E,configurable:!0}),E.displayName=m(B,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===E||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,B):(y.__proto__=B,m(y,u,"GeneratorFunction")),y.prototype=Object.create(N),y},r.awrap=function(y){return{__await:y}},O(v.prototype),m(v.prototype,p,function(){return this}),r.AsyncIterator=v,r.async=function(y,b,T,D,P){P===void 0&&(P=Promise);var z=new v(g(y,b,T,D),P);return r.isGeneratorFunction(b)?z:z.next().then(function(K){return K.done?K.value:z.next()})},O(N),m(N,u,"Generator"),m(N,c,function(){return this}),m(N,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),T=[];for(var D in b)T.push(D);return T.reverse(),function P(){for(;T.length;){var z=T.pop();if(z in b)return P.value=z,P.done=!1,P}return P.done=!0,P}},r.values=U,j.prototype={constructor:j,reset:function(y){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(L),!y)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function T(ee,ae){return z.type="throw",z.arg=y,b.next=ee,ae&&(b.method="next",b.arg=a),!!ae}for(var D=this.tryEntries.length-1;D>=0;--D){var P=this.tryEntries[D],z=P.completion;if(P.tryLoc==="root")return T("end");if(P.tryLoc<=this.prev){var K=s.call(P,"catchLoc"),Q=s.call(P,"finallyLoc");if(K&&Q){if(this.prev<P.catchLoc)return T(P.catchLoc,!0);if(this.prev<P.finallyLoc)return T(P.finallyLoc)}else if(K){if(this.prev<P.catchLoc)return T(P.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<P.finallyLoc)return T(P.finallyLoc)}}}},abrupt:function(y,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var P=D;break}}P&&(y==="break"||y==="continue")&&P.tryLoc<=b&&b<=P.finallyLoc&&(P=null);var z=P?P.completion:{};return z.type=y,z.arg=b,P?(this.method="next",this.next=P.finallyLoc,S):this.complete(z)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),S},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),L(T),S}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===y){var D=T.completion;if(D.type==="throw"){var P=D.arg;L(T)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,T){return this.delegate={iterator:U(y),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),S}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Oa);var to=Oa.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function Np(t){var o=function(n,a){if(xt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(xt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return xt(o)==="symbol"?o:String(o)}function rn(t,o,n){return(o=Np(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=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 i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,m=p-s,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var C=m/t.size*100,f=100-g/t.size*100;n("change",C,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Fa=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Ap=Fa(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Tp=Fa(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(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))}}Ke(".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}"),no.render=function(t,o,n,a,r,i){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"]))},[Ap,Tp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=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 i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Ep={ref:"canvas"};Ke(".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}"),ao.render=function(t,o,n,a,r,i){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",Ep,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=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(),i=function(){var s=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Vp={ref:"canvas"};Ke(".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}"),ro.render=function(t,o,n,a,r,i){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",Vp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=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")}}}}),Lp={class:"input"},Bp={class:"label"},Op=[".value"];function Pt(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 i,s,d,l,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(m){u=!0,s=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||Va(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 $e(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){rn(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}Ke(".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}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Lp,[e.createElementVNode("span",Bp,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,Op)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var $a=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},Ma={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(Ma[o]||o).concat(Ma[n]||n)},va=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(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)},jt=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,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},Pa=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=$a(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=jt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(va(jt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var m=$a(a,r/100,i/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(i),"%)");case"rgb":var g=jt(a,r,i),C=g.r,f=g.g,w=g.b;return"rgb(".concat(C,", ").concat(f,", ").concat(w,")");default:return va(jt(a,r,i))}},so=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,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ja=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},Ra=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]}},ln=function(t,o,n){if(typeof t=="string"&&t!==""){var a=sn(t,cn(t),n),r=Ha(a);return Pa(r,o,n)}return""},Ua=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ga=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},za=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},sn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ua(t),a=n.r,r=n.g,i=n.b,s=n.a;return $e($e({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=za(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ga(t),c=l.h,p=l.s,u=l.l,m=l.a;return $e($e({},ja({h:c,s:p,l:u})),{},{a:+m});default:var g=Ra(t),C=g.r,f=g.g,w=g.b,_=g.a;return $e($e({},so({r:C,g:f,b:w})),{},{a:_/255})}else switch(o){case"rgb":return $e($e({},so(Ua(t))),{},{a:1});case"hsv":var k=za(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return $e($e({},ja(Ga(t))),{},{a:1});default:return $e($e({},so(Ra(t))),{},{a:1})}},cn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Ha=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}},Rt=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)+"")}),i=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"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(l,"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(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Ip=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Rt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Ip)},Rt.__scopeId="data-v-02da71fd",Rt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:Rt},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 ln(a,"hex",!0)})})}}}),Fp={class:"colors"};function Ya(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 ze(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},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 ze(ze({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var k,S=(k=t.value)===null||k===void 0?void 0:k.trim();if(S!=null&&S!==""){var h=cn(S);return Ha(sn(S,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,S){var h="";k!=null?(h=Pa(ze({},k),t.format,t.showAlpha),s.value=ze({},k)):s.value=null,d.value=h;var E=l();JSON.stringify(k)!==JSON.stringify(E)&&JSON.stringify(k)!==JSON.stringify(S)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,S;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(S=e.unref(i))===null||S===void 0?void 0:S.a:1}),g=e.computed(function(){return jt(e.unref(c),e.unref(p),e.unref(u))}),C=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),w=e.ref(-1),_=function(k,S,h){if(k.length!==0){var E=sn(k,S,h),B=E.h,I=E.s,A=E.v;if(!(isNaN(B)||isNaN(I)||isNaN(A))){var V=1,N=E.a;isNaN(N)||(V=N),i.value={h:B,s:I,v:A,a:V}}}};return{h:c,s:p,v:u,a:m,rgbStr:C,onSelectSaturation:function(k,S){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:k,v:S,a:e.unref(m)}:i.value=ze(ze({},e.unref(i)),{},{s:k,v:S})},onSelectHue:function(k){w.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=ze(ze({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:k}:i.value=ze(ze({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){w.value=-1,d.value=k},handleChange:function(){var k,S=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(S!==""){var h=t.showAlpha,E=t.format,B=function(I,A,V){if(V)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(I);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(I);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(I);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(I)}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(I);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(I);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(I);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(I)}}(S,E,h);B?_(S,E,h):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:w,onSelectColor:function(k,S){if(w.value=S,(k=k.trim())==="")i.value=null;else{var h=cn(k);h?_(k,h,!0):i.value=null}}}}}),Dp={class:"picker-inner"},$p={class:"picker-header"};Ke(".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}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=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",Dp,[e.createElementVNode("div",$p,[e.createVNode(s,{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(l,{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)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=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"):""}})}}}),Mp=[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 dn(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){rn(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}Ke(".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}"),uo.render=function(t,o,n,a,r,i){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(Mp),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var st=null,Nt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Rt,Picker:po,AddColorItem:uo},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(x){return ln(x,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var x=t.value||"",F=Array.isArray(x)?x:[x];a.value=F.map(function(L){return ln(L,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,m,g,C,f=e.ref(null),w=e.ref(null),_=(l=f,c=w,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){st.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(x){var F=x.state,L=F.styles,j=F.placement,U=L.popper;u.value=dn(dn(dn({},U),p),{},{transformOrigin:j==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(x,F){var L,j=Pt(x,2),U=j[0],y=j[1],b=Pt(F,2),T=b[0],D=b[1];if(U&&y&&(T!==U||D!==T)){(L=st)===null||L===void 0||L.destroy();var P=U.$el||U,z=y.$el||y;e.nextTick(function(){st=xp(P,z,m)})}}),e.onBeforeUnmount(function(){var x;st&&((x=st)===null||x===void 0||x.destroy(),st=null)}),{instance:st,style:u}),k=_.style,S=function(){e.unref(f)==null&&(f.value=e.unref(M)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){i.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]))},E=e.ref(),B=function(){var x=Ba(oo.mark(function F(L){var j,U,y,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(U=L.target,(y=(j=U.dataset)===null||j===void 0?void 0:j.index)!=null&&y!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){S(),clearTimeout(g)},100)):S(),i.value=b,f.value=U;case 10:case"end":return T.stop()}},F)}));return function(F){return x.apply(this,arguments)}}(),I=function(){var x=Ba(oo.mark(function F(L){var j,U,y,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=L.target,!(!((j=e.unref(E))!==null&&j!==void 0&&j.isEqualNode(b))&&(!((U=e.unref(E))===null||U===void 0)&&U.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(y=e.unref(w))===null||y===void 0?void 0:y.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:C&&clearTimeout(C),C=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return D.stop()}},F)}));return function(F){return x.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(S(),clearTimeout(C))});var A,V=e.ref(t.max>e.unref(a).length),N=e.computed(function(){return typeof t.popupContainer=="string"||xt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),O=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),v=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(w)]},function(){e.nextTick(function(){var x,F;(x=e.unref(E))===null||x===void 0||x.setAttribute("pick-colors-theme",e.unref(v)),(F=e.unref(w))===null||F===void 0||(F=F.$el)===null||F===void 0||F.setAttribute("pick-colors-theme",e.unref(v))})},{immediate:!0}),e.provide("theme",{theme:v});var M=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",I,!1),t.showPicker&&S()}),e.onUnmounted(function(){document.removeEventListener("mouseup",I,!1),g&&(clearTimeout(g),g=null),C&&(clearTimeout(C),C=null)}),{valueList:a,colorItemSelected:function(x){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===x},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(x){var F=e.unref(i),L=e.unref(a).slice(),j=e.unref(a).length;if(F!=null){F>=0?L[F]=x:(i.value=j,L.push(x));var U="";U=Array.isArray(t.value)||t.addColor?L:x,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,x,F)),t.addColor&&j>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:E,onColorClick:B,pickerRef:w,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var F=x.target;A=+F.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var F=+x.target.dataset.index,L=Sp(e.unref(a)),j=L[A];L.splice(A,1);var U=L.slice(0,F),y=L.splice(F),b=U.concat([j]).concat(y);n("update:value",b),n("change",b,b[A],A)},colorItemsRef:M,pickerStyle:k,values:r,teleportDisabled:O,toPopupContainer:N}}});Ke(".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)}"),Nt.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=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(s,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},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(l,{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)},Nt.__scopeId="data-v-3c43ade8",Nt.__file="src/ColorPicker.vue";const vp=e.defineComponent({name:"ColorPick",components:{PickColors:Nt,AInput:$.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}}}}),tm="",Pp={class:"color-pick"};function jp(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Rp=oe(vp,[["render",jp],["__scopeId","data-v-e2113f43"]]),Up=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Nt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),om="",Gp={class:"color-group-pick"};function zp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Hp=oe(Up,[["render",zp],["__scopeId","data-v-b2be8322"]]),Yp=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:Lo,MinusCircleOutlined:Gl,PickColors:Nt,InputNumber:da,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 u;const c=(u=t.value)==null?void 0:u.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 g=Object.keys(m),C={};g.forEach(f=>{C[f]=""}),c.push(C)}else typeof m=="string"&&c.push(m);n.value=c}else $.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const C=c==null?void 0:c.target,f=(C==null?void 0:C.value)!=null?C==null?void 0:C.value:c;u?m[p][u]=f:m[p]=f,n.value=m}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),nm="",Wp={class:"form-group"},qp={class:"form-row"},Kp={key:0,class:"label"},Qp={key:1,class:"label"},Xp={class:"icon-group"};function Jp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Wp,[e.createVNode(s,{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",qp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Kp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Qp,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Xp,[(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(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Zp=oe(Yp,[["render",Jp],["__scopeId","data-v-f0c0ab4d"]]),eu=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:$.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function tu(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const ou=oe(eu,[["render",tu]]),nu=e.defineComponent({name:"PropsToForm",components:{Input:ld,InputNumber:da,RadioGroup:pd,Select:md,Switch:gd,ColorPick:Rp,ColorGroupPick:Hp,FormGroup:Zp,Textarea:ou},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Gt),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:m}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:C="change",events:f}=p;c[u]={...p,valueProp:g,value:m,events:{[C]:(w,_=!0)=>{i(_?{[u]:w}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:J.reduce(l,(c,p,u)=>{const m=nd[u];if(Array.isArray(m)){const g=m.find(C=>{const{onlyType:f,excludeType:w}=C;return f==null&&w==null?!0:f?he(e.unref(r),f):w?!he(e.unref(r),w):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:he}}}),am="",au={class:"props-to-form"},ru={class:"label"},lu={class:"component-wrapper"};function iu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",ru,e.toDisplayString(s.label),1),e.createElementVNode("div",lu,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const su=oe(nu,[["render",iu],["__scopeId","data-v-c6fb2484"]]);function cu(){return new Worker("/assets/editor.worker-02df2e61.js")}function du(){return new Worker("/assets/json.worker-867823a6.js")}function pu(){return new Worker("/assets/ts.worker-7254b425.js")}const uu=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(i,s){return s==="json"?new du:s==="typescript"||s==="javascript"?new pu:new cu}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=tr.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(J.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),rm="",fu={class:"editor",ref:"dom"};function mu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",fu,null,512)}const qa=oe(uu,[["render",mu],["__scopeId","data-v-71e88372"]]),hu=[{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}],yu=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:qa},setup(){const t=e.inject(Ye),o=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),n=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var w,_,k;let f=[];if(r.value=[],!o.value)f=((w=e.unref(n))==null?void 0:w.queryColumnList)||[];else{const S=((_=e.unref(n))==null?void 0:_.rowHeaderList)||[],h=((k=e.unref(n))==null?void 0:k.indicators)||[];f=[...S,...h]}f.forEach(S=>{var E;let h=(E=e.unref(a))==null?void 0:E.find(B=>B.prop===S.name);h||(h={label:S.label,prop:S.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:hu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,w,_)=>{f&&w&&(i=f,s=w,d.value=f[w]||"",c.value=!0,l.value=_)},onEditorChange:f=>{try{d.value=f}catch(w){console.error(w)}},changeRenderBool:(f,w)=>{f.style=w.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),lm="",gu={class:"table-column-config"};function bu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",gu,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:C,text:f,record:w})=>[C.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:_=>t.changeRenderBool(w,_),checked:w.style},null,8,["onChange","checked"])):C.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:w.width,"onUpdate:value":_=>w.width=_,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):C.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.renderText,"onUpdate:value":_=>w.renderText=_,readOnly:!0,onClick:_=>t.renderSave(w,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.headerTemplate,"onUpdate:value":_=>w.headerTemplate=_,readOnly:!0,onClick:_=>t.renderSave(w,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:w.headerAlign,"onUpdate:value":_=>w.headerAlign=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:w.align,"onUpdate:value":_=>w.align=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:w.fixed,"onUpdate:value":_=>w.fixed=_},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:w.dataFormat,"onUpdate:value":_=>w.dataFormat=_,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[w.dataFormat&&w.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:w.retentiondigit,"onUpdate:value":_=>w.retentiondigit=_,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=C=>t.editorVisible=C),"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 Cu=oe(yu,[["render",bu],["__scopeId","data-v-afebddc0"]]),wu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:su,TableColumnConfig:Cu,Editor:qa,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Gt),r=e.inject(hn),i=e.inject(ho),s=e.inject(yo),d=e.inject(mn),l=E=>{i({...wn[E]},!1),d()},c=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>od.map(E=>{const{props:B,title:I,enableProps:A,onlyType:V,excludeType:N}=E,O=[];B.forEach(x=>{typeof x=="string"&&(p.includes(x)?t.isGroupTable&&O.push(x):O.push(x))});let v,M;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(v=typeof A=="string"&&r.value?r.value[A]:void 0,M=J.pick(e.unref(r),O)):(v=typeof A=="string"&&a.value?a.value[A]:void 0,M=J.pick(e.unref(a),O)),{title:I,enableProps:v,enablePropsName:A,onlyType:V,excludeType:N,props:M}}).filter(({props:E})=>Object.keys(E).length>0)),m=(E,B)=>{const{onlyType:I,excludeType:A}=E;return I==null&&A==null?!0:I?he(B,I):A?!he(B,A):!1},g=(E,B)=>(B==null||B.stopPropagation(),E),C=(E,B)=>{B!=null&&i({[B]:E})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),w=E=>{try{const B=JSON.parse(E||"{}");i(B,!1)}catch(B){console.error(B)}},_=e.ref(""),k=E=>{try{_.value=E}catch(B){console.error(B)}},S=(E,B)=>{try{s({[B]:E})}catch(I){console.error(I)}},h=e.computed(()=>{var E;return["customGraph"].includes((E=e.unref(a))==null?void 0:E.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:w,tableOptions:r,optionCode:_,onEditorChange:k,tableEditorChange:S,onSwitchClick:g,onSwitchChange:C,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),im="",sm="",ku={class:"style-group"};function _u(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),C=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",ku,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:f.enableProps,onChange:w=>t.onSwitchChange(w,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{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(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var w;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((w=f.onlyType)!=null&&w.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(C)]),_:1}),e.createVNode(u,{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]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{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]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const xu=oe(wu,[["render",_u],["__scopeId","data-v-2fb3e2ad"]]),Su=e.defineComponent({name:"Card",components:{CloseOutlined:Kt,MenuOutlined:Xn,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(zt),a=e.inject(bn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,T)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const y=[],b=(T=e.unref(d))==null?void 0:T.find(P=>{var z;return P.id===((z=t.control)==null?void 0:z.id)});if(b){const P=b.type,z=J.pick(b,["value","startTime","endTime"]);(D=Object.keys(z))!=null&&D.length||(z.value="");for(const K in z)if(Object.prototype.hasOwnProperty.call(z,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(ae=>he(P,ae.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{s(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(T=>T.id===y);if(b){const{type:T,id:D,events:P=[]}=b,z=Qt(T),K=P.findIndex(Q=>{var ee;return Q.on===z&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&(P.splice(K,1),n({id:D,events:P}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const T=e.unref(d).find(D=>D.id===y);T&&(b.keyName=T.keyName,I(T,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),C=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},w=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},_=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},S=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),E=e.inject(me),B=e.computed(()=>{var Ve;const{classificationList:y=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:P=[],rowHeaderList:z=[],queryColumnList:K=[]}=e.unref(E),Q=J.cloneDeep([...y,...b,...T,...D,...P,...z,...K]);if(Q!=null&&Q.length)for(const se of Q)se.id=se.name;const ee=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(se=>({...se,id:se.name,label:se.title||se.label})),...Q];if(((Ve=e.unref(h))==null?void 0:Ve.type)==="ecanSelect"){const{selectFieldOptions:se=[]}=e.unref(E);if(ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"}),se!=null&&se.length)for(const Ce of se)ee.unshift({label:Ce.label,name:Ce.value,id:Ce.value,genericType:"TEXT"})}const ae=new Map,ge=ee.length;for(let se=0;se<ge;se++){const Ce=ee[se],{id:et}=Ce||{};ae.set(et,Ce)}return[...ae].map(([se,Ce])=>Ce)});function I(y,b){var K,Q;const{type:T,id:D,events:P=[]}=y,z=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(E))==null?void 0:K.controlList)||[]).find(ae=>ae.id===e.unref(g))||u(e.unref(g))),P.find(ee=>{var ae;return ee.on===z&&ee.target===((ae=e.unref(h))==null?void 0:ae.id)&&ee.emit==="refreshData"})||n({id:D,events:[...P,{on:z,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const A=(y,b)=>{if(y){const{label:T,name:D,id:P,genericType:z,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},ae={...t.control,conditionKey:P,conditionLabel:T,conditionName:D,conditionValueType:z,indexCode:K,typeGuid:Q,indexCodeNum:ee};bt(ae,"rule")||(ae.rule="EQUAL"),bt(ae,"dataType")||(ae.dataType="component"),r({control:ae,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},V=(y,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},N=(y,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},O=e.computed(()=>{const y=e.unref(B).find(T=>T.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="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"}]:[]}),v=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],M=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(z=>z.id===b),P=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];he(D==null?void 0:D.type,P)&&(y=!0)}return y}),x=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(P=>P.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(y=!0)}return y}),F=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(P=>P.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:m,onIdFocus:C,onPropChange:f,onModeChange:S,onRuleChange:w,onDataTypeChange:_,onCustomValueChange:k,conditionKeyOptions:B,onConditionKeyChange:A,idFilterOption:V,filterOption:N,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:O,dataTypeOption:v,isShowProp:x,isShowFormat:F,isShowModelProp:M,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"}]}}}),cm="",dm="",Nu={class:"control-card"};function Au(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Nu,[e.createVNode(s,{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(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(s,{key:3,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(s,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Tu=oe(Su,[["render",Au],["__scopeId","data-v-bc3e26e4"]]),Eu=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:Tu}}),pm="",Vu={key:0,class:"condition-list"},Lu={key:0,class:"condition-container"},Bu={key:0,class:"condition-text"},Ou={key:1,class:"condition-text"},Iu={class:"conditions"};function Fu(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Lu,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Bu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Ou,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Iu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Du=oe(Eu,[["render",Fu],["__scopeId","data-v-916ff9bd"]]),$u=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Du,AButton:$.Button},setup(){const t=e.inject(Pe),o=e.inject(me),n=e.inject(Se),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(bt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),bt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:la({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:_e()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:_e()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:_e()}),i({controlList:u})))},d=p=>{var w,_,k,S;const{index:u,path:m}=p;let g=J.cloneDeep((w=e.unref(a))==null?void 0:w.slice()),C=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(C[h])C=(_=C[h])==null?void 0:_.conditions;else break;if(Array.isArray(C)&&C[u])if(C.splice(u,1),C.length===1){if(f.length>0){const h=f.length-1,E=f[h],B=f.slice(0,h);let I=g,A="";for(const V of B)if(I[V])A=(k=I[V])==null?void 0:k.join,I=(S=I[V])==null?void 0:S.conditions;else break;if(A===C[0].join){if(Array.isArray(C[0].conditions)){const V=J.cloneDeep(C[0].conditions);I.splice(+E,1),I.splice(+E,0,...V)}}else I[E]=C[0]}}else C.length===0&&(g=[]);i({controlList:g})}},l=p=>{var _,k;const{control:u,index:m,path:g}=p,C=J.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let f=C;const w=g.split("-");if(w!=null&&w.length)for(const S of w)if(f[S])f=(k=f[S])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:C})},c=(p,u,m)=>{var _,k,S;const g=J.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let C=g,f="";const w=p.split("-");if(w!=null&&w.length){for(const h of w)if(C[h])f=(k=C[h])==null?void 0:k.join,C=(S=C[h])==null?void 0:S.conditions;else break;if(f===m)C.splice(u+1,0,{keyValue:_e()});else{const h=J.cloneDeep(C[u]);C[u]={join:m,conditions:[h,{keyValue:_e()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),um="",Mu={class:"control-group"},vu={class:"control-group-header"},Pu={class:"control-group-content"};function ju(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Mu,[e.createElementVNode("div",vu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Pu,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Ru=oe($u,[["render",ju],["__scopeId","data-v-1e37d2d3"]]),Uu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Kt,AppstoreAddOutlined:Lo,ASelect:$.Select,ASelectOption:$.SelectOption,AInput:$.Input,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(Pe),r=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.filter(E=>E.keyName!=="")}),i=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],s=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],d=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],l=e.ref(J.cloneDeep(t.item));e.watch(l,h=>{o("update",{...h,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var E;let h=null;if(((E=e.unref(l))==null?void 0:E.dataType)==="component"){const B=e.unref(r).find(I=>{var A;return I.id===((A=e.unref(l))==null?void 0:A.id)});B&&(h=B)}return h}),p=e.computed(()=>{var E;let h=!1;return((E=e.unref(l))==null?void 0:E.variableType)==="DATE"&&(h=!0),h}),u=e.computed(()=>{let h=!1;return e.unref(c)&&(h=he(e.unref(c).type,"range")),h}),m=e.computed(()=>{let h=!1;return e.unref(c)&&(he(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(h=!0):he(e.unref(c).type,"date")&&(h=!0)),h}),g=(h,E)=>{h&&(e.unref(l).keyName=E.keyName)},C=()=>{o("delete",t.index)},f=e.computed(()=>e.unref(p)?[{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"}]:[]),w=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},_=()=>{e.unref(l).format=null},k=(h,E)=>{var B;return(B=E==null?void 0:E.keyName)==null?void 0:B.toLowerCase().includes(h==null?void 0:h.toLowerCase())};return e.watch(m,h=>{h&&(e.unref(l).operateType||(e.unref(l).operateType="add"),e.unref(l).operateMode||(e.unref(l).operateMode="year"),e.unref(l).operateValue||(e.unref(l).operateValue=0),e.unref(l).activeOperateKey||(e.unref(l).activeOperateKey=1))},{immediate:!0}),{variableData:l,typeOption:i,dataTypeOption:s,usedComponentList:r,formatOptions:f,rangeTypeOptions:d,isShowFormat:p,isDateRangeComponent:u,isShowDateOperate:m,popoverVisible:n,idFilterOption:k,onChangeComponent:g,onDelete:C,onChangeDataType:w,onChangeVariableType:_,changeTab:h=>{e.unref(l).activeOperateKey=h,h===1?e.unref(l).operateValue=0:h===2&&(e.unref(l).operateValue="rangeValue")}}}}),fm="",Gu={class:"variable-item"},zu=["title"],Hu={class:"popover-content-wrap"},Yu={style:{display:"flex"}};function Wu(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("a-tabs"),m=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),C=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Gu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,zu)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=f=>t.variableData.variableName=f),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=f=>t.variableData.variableType=f),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=f=>t.variableData.dataType=f),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=f=>t.variableData.id=f),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=f=>t.variableData.variableValue=f),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=f=>t.variableData.dateTypeValue=f),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=f=>t.variableData.format=f),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(g,{key:4,visible:t.popoverVisible,"onUpdate:visible":o[14]||(o[14]=f=>t.popoverVisible=f),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Hu,[e.createVNode(u,{defaultActiveKey:t.variableData.activeOperateKey,onChange:t.changeTab},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{tab:"日期偏移",key:1},{default:e.withCtx(()=>[e.createVNode(c,{class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=f=>t.variableData.operateValue=f),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=f=>t.variableData.operateType=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=f=>t.variableData.operateMode=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])]),_:1})),t.isDateRangeComponent?(e.openBlock(),e.createBlock(p,{tab:"自定义",key:2},{default:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(d,{value:t.variableData.operateValue,"onUpdate:value":o[10]||(o[10]=f=>t.variableData.operateValue=f),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[11]||(o[11]=f=>t.variableData.operateMode=f),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[12]||(o[12]=f=>t.variableData.operateType=f)},{default:e.withCtx(()=>[e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[13]||(o[13]=f=>{t.popoverVisible=!0})},[e.createVNode(m)])]),_:1},8,["visible"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const qu=oe(Uu,[["render",Wu],["__scopeId","data-v-1d5b6ae6"]]),Ku=e.defineComponent({name:"VariableGroup",components:{VariableItem:qu},setup(){const t=e.inject(me),o=e.inject(Se),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Bt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=J.cloneDeep(e.unref(a));l.push({keyValue:_e(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0,activeOperateKey:1}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=J.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=J.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),mm="",Qu={class:"variable-group"},Xu={class:"variable-group-header"},Ju={class:"variable-group-content"};function Zu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Qu,[e.createElementVNode("div",Xu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",Ju,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const ef=oe(Ku,[["render",Zu],["__scopeId","data-v-fd60cd09"]]),tf=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:C,builtInCalcWay:f,formula:w,conditions:_,aggregate:k}=s;let S;return _&&(S=r(_)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:C,builtInCalcWay:f,formula:w,conditions:S}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:C=[],seriesList:f=[],leftAxisList:w=[],rightAxisList:_=[],queryColumnList:k=[],indicators:S=[],dataSourceId:h,idxLibMode:E,preview:B=!1}=s||{};m==null&&(he(d,"table")?m="1":m="2");let I;if(Array.isArray(C)&&C.length>0){const O=C.length;for(let v=0;v<O;v++){const M=C[v]||{},{label:x="",name:F="",show:L=!1,sort:j,customGroup:U,conditions:y}=M;if(L||O===1){I={label:x.trim(),columnName:F,show:L,sort:j,customGroup:U,conditions:r(y)};break}}}let A;if(Array.isArray(f)&&f.length>0){const O=f.length;for(let v=0;v<O;v++){const M=f[v]||{},{label:x="",name:F="",show:L=!1,sort:j,customGroup:U,conditions:y}=M;if(L||O===1){A={label:x.trim(),columnName:F,show:L,sort:j,customGroup:U,conditions:r(y)};break}}}const V=[];k==null||k.forEach(O=>{V.push(o(O))});const N=[];if(w==null||w.forEach(O=>{O.location="LEFT",N.push(i(O))}),_==null||_.forEach(O=>{O.location="RIGHT",N.push(i(O))}),S==null||S.forEach(O=>{O.location="LEFT",N.push(i(O))}),!(m==="1"&&V.length===0)&&!(m==="2"&&N.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:g,classification:I,series:A,indicatorList:N,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:E,preview:B})}catch(O){console.error(O)}}},Ka=(t,o)=>{const n={dayjs:de,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let m=0;m<u.length;m++){const g=u[m],C=i[g];C!=null&&(c=c.replace(g,C))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Ka(c,n)),t=t.replace(l,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},Ut=(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 i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=Ka(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},of=(t,o,n)=>{switch(t.type){case"bar":return nf(t,o,n);case"line":return af(t,o,n);case"pie":return rf(t,o,n);case"comboGraph":return lf(t,o,n);default:return{}}},nf=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let m=0;m<p;m++){const g={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.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 u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:C,seriesName:f,name:w,value:_,data:k}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(m,{textData:{marker:C,name:w,value:_,a:f,b:w,c:_,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},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(l),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 Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i: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 Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},af=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[u],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 u="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:C,seriesName:f,name:w,value:_,data:k}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(m,{textData:{marker:C,name:w,value:_,a:f,b:w,c:_,...k}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},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 Ut(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 Ut(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(l)}},rf=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,c,d:p,...u}},{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:Es(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:{}}}]}},lf=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ut(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:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<c;g++){const C=m[g],{tooltipFormatter:f}=C||{},{marker:w,seriesName:_,name:k,value:S,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fo(f||u,{textData:{marker:w,name:k,value:S,seriesName:_,a:_,b:k,c:S,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),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(s)}},sf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:C,value:f}=g,w={...t[0],value:t[0][f]};r.add(C),p.push(w)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],m=u[n];r.add(m);for(let g=0;g<d;g++){const C=a[g],{label:f,value:w}=C,_={...u,value:u[w]};if(i.has(f)){const k=i.get(f);k.push(_),i.set(f,k)}else i.set(f,[_])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},cf=(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 i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[n]||"",g=u[a]||"",C=u[r]||"";if(i.add(m),s.has(C)){const f=s.get(C);f.push({name:m,value:g,...u}),s.set(C,f)}else s.set(C,[{name:m,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},df=e.defineComponent({name:"ChartGraph",components:{ASpin:$.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Me);let i=null;const s=e.inject(ve)||"",d=e.inject(me)||{},l=e.inject(Gt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),C=e.computed(()=>g.value?rr:12),f=e.ref({}),w=e.ref(),_=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return w.value;const N=of(V,e.unref(f),C.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.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,...N}}),k=(V=[],N,O=!1)=>{const v=O?N:null;f.value=sf(V,v)},S=(V=[],N)=>{f.value=cf(V,N)},h=async()=>{var V,N,O;try{const v=tf({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});m.value=!0;const M=await v(),{columns:x=[],rows:F=[]}=((N=M==null?void 0:M.data)==null?void 0:N.data)??{};if(((O=e.unref(n.value))==null?void 0:O.type)==="pie"){let L=[];if(x.length>0){const j=x[0],U=x[1];L=F.map(y=>({name:y[j],value:y[U]}))}S(L)}else{let L;x.length>0&&(L={name:x[0],types:x.slice(1).map(j=>({label:j,value:j}))}),k(F,L,!0)}}catch(v){console.error(v)}finally{m.value=!1}},E={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},B=()=>{e.unref(f).dataset.length===0?u.value.setOption(E):u.value.setOption(_.value)},I=()=>{e.unref(n.value).type!=="customGraph"&&h()},A=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(_,()=>{B()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const N=eval;w.value=N(V)}catch(N){console.error(N)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(A),i.observe(p.value)),u.value=ar.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:I}),{echartRef:c,loading:m}}}),hm="",pf={class:"ecan-chart-graph",ref:"chartWrapRef"},uf={style:{width:"100%",height:"100%"},ref:"echartRef"};function ff(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",pf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",uf,null,512)]),_:1},8,["spinning"])],512)}const Qa=oe(df,[["render",ff],["__scopeId","data-v-8049fed2"]]),mf=e.defineComponent({name:"DataConfig",components:{DataGroup:td,StyleGroup:xu,ChartGraph:Qa,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:Ru,VariableGroup:ef,AButton:$.Button,ReloadOutlined:ri},setup(){var I;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(fn),i=e.inject(me),s=e.inject(Pe),d=e.inject(Cn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const A=J.cloneDeep(e.unref(a));p(A);const V=J.pick(A,J.without(Object.keys(A),"position","top","left","width","height"));he(A.type,l)?(V.height=A.height,V.width=A.width):V.height="290px";const N=J.cloneDeep(e.unref(i));return N.pageMode="design",N.componentList=s,N.preview=!0,N.pageConfig=d,{...V,graphicConfig:N,toolboxShow:!1,sourceLeft:A.left,sourceTop:A.top}});function p(A){var V,N,O,v;["#ffffff","#fff"].includes((V=A==null?void 0:A.color)==null?void 0:V.toLowerCase())&&(A.color="#000"),["#ffffff","#fff"].includes((N=A==null?void 0:A.variableColor)==null?void 0:N.toLowerCase())&&(A.variableColor="#000"),["#ffffff","#fff"].includes((O=A==null?void 0:A.increaseColor)==null?void 0:O.toLowerCase())&&(A.increaseColor="#000"),["#ffffff","#fff"].includes((v=A==null?void 0:A.declineColor)==null?void 0:v.toLowerCase())&&(A.declineColor="#000")}const u=e.computed(()=>{let A=!0;return he(e.unref(c).type,l)&&(A=!1),A}),m=e.computed(()=>{var A;return(A=e.unref(c))==null?void 0:A.type}),g=e.computed(()=>{var A;return!!((A=e.unref(c))!=null&&A.isGroupTable)}),C=A=>{const V=A==="1";V&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(V),A==="3"&&S()},f=e.ref(),w=e.inject(Me),_=e.unref(e.inject(ve)),k=(I=window==null?void 0:window.config)==null?void 0:I.pageId;function S(){var x;const{leftAxisList:A=[],rightAxisList:V=[],queryColumnList:N=[],indicators:O=[]}=e.unref(i),v=[...A,...V,...N,...O],M={};for(const F of v){const{id:L="",indexCode:j=""}=F;L&&!bt(F,"calcType")&&!M[L]&&(M[L]=j)}if((x=Object.keys(M))!=null&&x.length){const F=[];for(const L in M)F.push(new Promise((j,U)=>{w.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:L,indexCode:M[L],dataSourceId:""},{headers:{Authentication:_,operateContext:"ygt"}}).then(y=>{var D;const{success:b,data:T=[]}=y.data;b&&((D=T==null?void 0:T.dataViewColumns)!=null&&D.length)?j(T.dataViewColumns):U(T)}).catch(y=>{U(y)})}));Promise.all(F).then(L=>{if(L!=null&&L.length){const j=L.reduce((U,y)=>U.filter(b=>y.find(T=>T.typeGuid===b.typeGuid)));f.value=j.filter(U=>U.typeGuid)}})}}const h=()=>{var V;let A;r&&m.value==="table"?A=window.updateConfig:A=(V=e.unref(n))==null?void 0:V.refreshData,typeof A=="function"&&A()},E=e.inject(Se),B=()=>{var A;E({variableConditions:Bt(((A=e.unref(i))==null?void 0:A.variableList)||[],s)})};return e.provide(mn,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:g,onChange:C,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:h,refreshAction:B}}}),ym="",hf={class:"data-config"},yf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function gf(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),C=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",hf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshAction},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),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(l,{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),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_: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",yf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(C,{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 bf=oe(mf,[["render",gf],["__scopeId","data-v-d85f4e1e"]]),Cf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:bf},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:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var E;return((E=e.unref(s))==null?void 0:E.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?J.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?J.cloneDeep(e.unref(s).chartsOptions):e.ref(J.cloneDeep(wn.line));p=e.ref(p);let u=e.unref(s).tableOptions?J.cloneDeep(e.unref(s).tableOptions):e.ref(J.cloneDeep(lr));u=e.ref(u);const m=e.ref([]),g=E=>{m.value=E},C=E=>{c.value={...e.unref(c),...e.unref(E)}},f=(E,B=!0)=>{B?p.value={...e.unref(p),...e.unref(E)}:p.value={...e.unref(E)}},w=E=>{u.value={...e.unref(u),...e.unref(E)}},_=()=>m,k=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=J.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=J.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},S=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=S,t.request&&e.provide(Me,t.request),e.provide(un,{setDataList:g,getDataList:_});const h=E=>{n("updateUsedComponent",E)};return e.provide(Ye,s),e.provide(me,c),e.provide(Gt,p),e.provide(hn,u),e.provide(go,r),e.provide(fn,l),e.provide(ve,i),e.provide(Se,C),e.provide(ho,f),e.provide(yo,w),e.provide(Pe,t.renderUsedComponentList),e.provide(zt,h),e.provide(bn,t.mapAttributeProps),e.provide(Cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),gm="",wf={key:0,class:"config-modal"},kf={class:"config-modal-left"},_f={class:"config-modal-right"};function xf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",wf,[e.createElementVNode("div",kf,[e.createVNode(s)]),e.createElementVNode("div",_f,[e.createVNode(d)])]))}const Xa=pn(oe(Cf,[["render",xf],["__scopeId","data-v-23d542ce"]])),Ja=pn(Qa),Za=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ja,EcanIndicatorLibrary:Xa},Symbol.toStringTag,{value:"Module"})),Sf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Za).forEach(a=>{const r=Za[a];r.install&&t.use(r)})}};ke.EcanChartGraph=Ja,ke.EcanIndicatorLibrary=Xa,ke.default=Sf,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
64
64
  //# sourceMappingURL=index.umd.js.map